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
Update docs to explain use of -g and --files to search for paths. #285
Update docs to explain use of -g and --files to search for paths. #285
Conversation
Combine with the --files flag to return matched filenames | ||
(i.e., to replicate ack/ag's -g flag). | ||
|
||
For example: rg -g '<pattern>' --files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change <pattern>
to <glob>
? I ask because I think we use <pattern>
elsewhere to refer to "regex pattern."
@@ -136,6 +144,10 @@ Project home page: https://github.com/BurntSushi/ripgrep | |||
--files | |||
: Print each file that would be searched (but don't search). | |||
|
|||
Combine with the -g flag to return matched paths, for example: | |||
|
|||
rg -g '<pattern>' --files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, change this to <glob>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I just have one nit. Thank you! :-)
Oh, and could you also put the string |
6e8095a
to
b5b5261
Compare
@BurntSushi thank you for your review! Made those changes. Let me know if what I did with the commit message isn't what you meant? Also I escaped the < and > characters around |
@YPCrumble Looks good to me! I verified that
Almost. Ideally, simple PRs like this should just be a single commit. You can do this by amending your previous commit and force pushing your branch, and that commit message is what should contain |
@BurntSushi got it - thanks for the explanation and making that adjustment for me. Didn't realize I can just take a look at the docs without compiling the code. Glad to have been able to contribute! |
@BurntSushi this updates docs to resolve #284, #193, #54, #75, #91, #48. Explains the combined use of
-g
and--files
flags to replicate the-g
option in ag/ack.Looks like I used a later version of pandoc to compile the docs that perhaps did things a little differently. It complained about using sed's
-i
flag (sed: -i may not be used with stdin
).Please let me know if any issues/suggestions from your end.
Thank you for your patience and thanks again for building ripgrep!