-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: --files-without-matches #138
Comments
I'm not opposed to adding I'm also not opposed to making |
Ha, I almost added this earlier @mernen but ran into exactly the problem you described 😄 |
OK, so I did some more thinking about this and I think the current behavior of Here is a proposed specification. Add a new flag |
Performs the opposite of --files-with-matches: only shows paths of files that contain zero matches. Closes BurntSushi#138
(If, like me, you're coming here from Google, the flag that made it into ripgrep is |
I keep coming back here to re-check what the flag is 😢 |
how can we use this flag in vs code search? |
This is the issue tracker for ripgrep. Your question is about VS Code UX. You are in the wrong place. |
One flag that occasionally comes useful is to identify files that don't match a certain expression. Both
ag
andack
have-L
/--files-without-matches
(effectively the opposite of-l
/--files-with-matches
).One minor problem here is that
rg -L
is already taken for following symlinks.Curiously,
ag -lv
appears to be a synonym of-L
. I'm not sure whether this is intentional or not, but it seems like a perfectly reasonable approach to me — in fact, years ago, before I knew of-L
, this is actually what I first tried withack
, and got bogus results (it interprets this combo as "list all files that have at least one line that does not match the given expression", like ripgrep does today). Personally, I don't think I've ever had a use case for this.The text was updated successfully, but these errors were encountered: