Comments (4)
I thought there was already an open issue for this, but I couldn't find it.
This is a rather difficult optimization to do and is blocked on a rewrite of globset
and probably ignore
. It's something I've been working on off-and-on for a while now, but it's unlikely to land any time soon. I'm not even 100% certain it's possible unless the --no-ignore
flag is also passed. The interaction point between -g/--glob
and ignore files will need to be carefully considered for something like this.
Your best bet is to use some other tool to filter out files first. Possibly even using your shell's glob support. Although those could in theory end up being slower than ripgrep even when ripgrep visits more than it needs to. It depends.
from ripgrep.
Alright, thanks for clarifying. Using fd
to write all of the interesting filepaths to a file and then xargs
-ing that into rg
got me results way faster!
It would be neat if rg
supported piping in filenames from stdin. So I wouldn't have to wait for fd
to finish its scan. Should I post another enhancement issue for that?
from ripgrep.
That's #273. But you shouldn't need it. You should be able to pipe the output of fd
straight into ripgrep with xargs
without writing to an intermediate file.
from ripgrep.
I can use xargs yes but ripgrep won't start searching any of those paths until the fd
scan completes.
EDIT: oh nvm i can make xargs chunk it up into multiple rg
invocations
from ripgrep.
Related Issues (20)
- rg spins in a nanosleep loop when one thread is blocked on a fifo
- [ignore] Fallback to use git check-ignore or support hook iteration HOT 3
- [feature request] Context up to a matching pattern instead of by fixed number of lines HOT 1
- ignore: WalkBuilder::build_parallel() example does not compile HOT 1
- FR: sort results by count HOT 1
- ripgrep does not properly apply ignore rules from .gitignore in parent directory
- global ignore / ripgreprc shell parameter expansion HOT 2
- unicode uppercase HOT 3
- Negation pattern/whitelisting is ignored from `--ignore-file` HOT 8
- .gitignore rule is matched incorrectly while in a subdir
- Adjacent replaced multiline matches result in wrong line numbers HOT 4
- Feature Request (globset): Expose `MatchStrategy` HOT 6
- Support decompression flags / smart use of zstd --long HOT 1
- Add `Select-String`/`sls` to the benchsuite HOT 6
- JSON indexing off HOT 4
- Feature Request: Early Bail Out for Time-Consuming Regex Matches in pcre2 HOT 4
- cursor disappearing HOT 1
- failing test: f2361_sort_nested_files
- The same `LineTerminator` is being used for searching and printing
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 ripgrep.