Comments (4)
Thanks for the report. Yes I think the -0
would probably work fine here. I guess we could use that for the --no-heading
setup that you are using.
from rg.el.
After some testing I think -0
would be problematic mainly since it would be cumbersome to get rid of those ugly null chars in the output. TBH, I have not really crafted these regexps myself and never put much thought into it. I think it actually makes more sense to be restrictive with the kind of stuff that is allowed in file names, iow doing something like [^:]+
for matching the filename part. This seems to be what grep.el is doing anyway so should be fine to be in line with that.
from rg.el.
Thank you for looking into it. I really appreciate it.
Yeah I figured having \0
in the output being bad, or at least requiring somewhat of a big-ish rewrite.
Like I said above I'd be perfectly fine with not allowing :
as part of the file name, whatever regex you do it with. [^:]+
looks absolutely reasonable. I do know that :
are allowed as part of file names on non-Windows systems, but then again I don't think this matters much wrt. to rg
. We (as in: the collective users of rg
) usually use it with code, with system configuration, maybe text archives. In each of those cases I've never seen :
to be part of the file name. They're usually only used with system files, e.g. stuff in /tmp
maybe.
The one exception that comes to mind is maildir directories.
Soooo… maybe making it configurable would be best? Or even toggle-able from the *rg*
buffers?
from rg.el.
Pushed a fix now without configuration possibilities. Let's add that if people request it.
from rg.el.
Related Issues (20)
- Only rg-use-old-defaults seems to work with result buffer HOT 6
- Would be nice if DWIM modes prompt for search string if no word at point HOT 3
- Question on searching and removing the whole line HOT 1
- Wgrep fails with "There are n unapplied changes. (0 changed)" HOT 1
- Result-based navigation fails HOT 3
- Question about using glob pattern with rg HOT 1
- Feature request: search symlinked file, but make the file path in "*rg*" buffer the path of the symlink HOT 6
- Comparison with Deadgrep? HOT 1
- Expose search history more prominently HOT 1
- project.el issue HOT 2
- support project.el external roots HOT 1
- When copying from buffer `*rg*`, some internal text is included HOT 1
- How to make "enter" key open target file at the location of the searched keyword? HOT 1
- option to choose rga HOT 1
- Feature request: Option to runcate long search terms in header line
- Feature request: Support `rg-rerun-change-project` in rg-mode
- Support search compressed files such as `.el.gz`?
- Any reason of adding `.` at the end of command on Windows? HOT 2
- Help wanted: how to get rg-match result position ? HOT 1
- Is there way to set default searching directory dynamically? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rg.el.