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)
- 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
- `--pre` doesn't work on Windows (CMD, MSYS2 bash, Powershell) HOT 16
- ARMv8 release binary for RPI 5 HOT 2
- ripgrep 14.1.0 exit silently when stdin is not connected (GNU parallel without --tty) HOT 8
- Feature Request: search for binary data by supplying a hex string HOT 9
- Is it possible to add a search for just a set of directories as a type? HOT 1
- Allow following symlinks to files HOT 2
- WalkDir ignores files that are in .gitignore outside of current git repository HOT 2
- Multiple quirks in ignore behavior HOT 1
- BUG: exit code on windows not stable (wrong on first run, then stable), seems to leak HOT 9
- pcre2 reset match \K drops submatches HOT 1
- ripgrep is slower than LTREP matching `[A-Z][A-Z]+` HOT 3
- --files is listing files that won't be searched into HOT 4
- ripgrep ignore files inside `.github` folder HOT 5
- Potentially incorrect or undocumented .gitignore files handling
- `--text` flag only works if it's late in the command 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 ripgrep.