-
-
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
Add filename-only option #103
Comments
This is already done. It's in |
To be clear for folks who stumbled upon this like I did, the way to only show filenames in
|
Here's the relevant help section from ripgrep 12.1.0:
|
Maybe helpful to know that adding the flag |
I think the help could be a little clearer - it doesn't clearly imply that the matches won't be printed. |
I agree with @NetMage I looked through all the file related options in the help and this one didn't seem to apply.
To me this says that it will only print those files that have at least one match. Which sounds like the default behavior. It doesn't say that it doesn't print the match, which is what most people are likely looking for. I think it would be more clear if the help read
|
|
Thank you for this! I used it to make function vg() { $EDITOR $(rg -l "$@"); } Then I can follow up "find all files containing pattern" with "edit them". |
I quite frequently use
grep -l
to simply identify files which contained any match of the given pattern. Since only existence checking is required, you could terminate at the first match. The list of files can then be fed toxargs
or the like. This would go hand-in-hand with the-0, --null
option.The text was updated successfully, but these errors were encountered: