Skip to content
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

Merged
merged 2 commits into from Dec 22, 2016

Conversation

YPCrumble
Copy link
Contributor

@YPCrumble YPCrumble commented Dec 21, 2016

@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!

Combine with the --files flag to return matched filenames
(i.e., to replicate ack/ag's -g flag).

For example: rg -g '<pattern>' --files
Copy link
Owner

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
Copy link
Owner

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>.

Copy link
Owner

@BurntSushi BurntSushi left a 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! :-)

@BurntSushi
Copy link
Owner

Oh, and could you also put the string Fixes #284 at the bottom of your commit message? I'm trying to keep things tidy. :-) Thanks!

@YPCrumble
Copy link
Contributor Author

@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 <glob> in rg.1.md because it appeared that not escaping them made them not appear in rg.1. Please me know if this was a mistake?

@BurntSushi BurntSushi merged commit 900ef0a into BurntSushi:master Dec 22, 2016
@BurntSushi
Copy link
Owner

@YPCrumble Looks good to me! I verified that rg.1 looks right by running man -l doc/rg.1.

Let me know if what I did with the commit message isn't what you meant?

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 Fixes #284 in it. I just went ahead and did that for you though. Thanks again!

@YPCrumble
Copy link
Contributor Author

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[QUESTION/SUGGESTION] Does/should ripgrep support ag/ack's -g flag for searching filenames?
2 participants