-
-
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
[QUESTION/SUGGESTION] Does/should ripgrep support ag/ack's -g flag for searching filenames? #284
Comments
Dupe of #193, #54, #75, #91, #48
Three things are clear to me:
Could you help me figure out how to make this feature more discoverable? |
@BurntSushi :) I was just typing up the nuance in one of those issues. I don't think the -g flag works the way I'm looking for (how it works using ag or ack). Let me know if I can explain further? |
@YPCrumble Did you click on the duplicate links? The |
@BurntSushi I'm going to create a quick repo to explain |
@YPCrumble Have you tried the
Let's try to keep discussion on one issue. |
@BurntSushi would you take a look at https://github.com/YPCrumble/rg_example - I added my questions in the |
@BurntSushi also I'm by no means an expert I apologize in advance if this is just confusion or a silly error on my end! |
@YPCrumble Are you not quoting the values you give to |
@BurntSushi OK now I got it. This solves my issue. What do you think about either adding either an example of how to search file/path names OR an alias (ala your -p flag) that would add the -g --files and the quotes around the searched term? I would be happy to try implementing the alias if that's interesting. I would suggest using the -P/--path flag as -p is already taken. My ideal would be to use the same -g flag as ag/ack or use -P for --pretty and -p for --path but seems like it would be a breaking (and therefore undesirable) change. For updating the docs option I suggest adding an example to both -g
--files
Thank you for your patience! |
I like your documentation suggestions. :-) I'd like to hold off on aliases for now since I think it makes the tool more confusing to use overall. I made a special exception for Here is something that might be helpful to you though:
Then you can just do |
Cool, will put into a PR! |
@YPCrumble Yay thanks! Don't forget to modify |
Update docs to explain use of -g and --files to search for paths. Fixes #284
Hi @BurntSushi and @YPCrumble, First of all, for me the whole point of using The workaround proposed in this thread works quite well, except one thing: the glob does not recursively go into directories (ergo: it's not usable in Unite). One way to fix it is to enable recursive globs by Is there a way to benefit from ripgrep's raw speed in Unite, or My
Thanks! |
@jmatraszek It's too hard for me to reason about your desired behavior without examples. Could you craft some specific examples using plain |
@jmatraszek Could you also please open a new issue? Bumping old closed issues is a sure fire way for your feedback to fall off my radar. :-( |
Per the ack documentation:
I've searched the documentation and can't find this feature. Is this something that you'd be interested in for ripgrep? I'd be happy to submit a PR for it - I'm not a Rust expert but would love to jump in.
Thanks for writing such a great search tool!
The text was updated successfully, but these errors were encountered: