-
-
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
Provide a --directories
option to list directories
#388
Comments
+1! |
This is a dupe of #169, which I closed on the grounds that it is out of scope. Please read that issue though, because it includes ideas for workarounds. Do they work for you? My strong preference here is for someone to write a Rust tool that does this for you. It would be relatively simple to do today, since all of the directory traversal and |
@bag-man Please avoid |
Thanks! Sorry I didn't search old isuses! Piping ( |
@WilliamsMJ Since #169, ripgrep has grown a |
So Or can I drop some part of the pipeline? Note the important thing about piping through |
@WilliamsMJ Ah I see. If you don't care about the sort, then it'd be fine to drop |
I still got duplicates when I tried this command. Removing |
@ddickstein can you open a new issue with a reproducible example? ripgrep should never be showing the same file path twice in the output of --files. |
Well the duplicates would appear with the |
@ddickstein Oh I see.
But if you apply
So basically, you need to sort/dedup after applying |
Oh interesting. So if it sorted by file type (file v directory) and then alphabetically instead of just alphabetizing file paths then it would have worked? I wonder what the other use cases would be for one kind of sort vs the other. |
Relevant project, https://github.com/sharkdp/fd. A simple, fast and user-friendly alternative to find. |
Hunting and pecking by hand has gotten tedious. See: BurntSushi/ripgrep#388 (comment)
I'm using ripgrep with
fzf
to fly around my filesystem much faster than I could by usingfind
withfzf
.This approach uses
rg --files
, which is not only a nice terse, sensible alternative to a long, pedanticfind
command. It's also orders of magnitude faster!It would be great if I could do
rg --directories
and have it work just likerg --files
, but give me all the directories, rather than all the files.find
obviously supports a huge variety of options that are out of scope for a tool focussed on searching within files. This particular use case seems (to me at least! ymmv!) common enough that it might be worth supporting with ripgrep.The text was updated successfully, but these errors were encountered: