-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
Allow for exact find #157
Comments
Thank you for the feedback!
Note that the search pattern in fd is always a regular expression, so in a situation like this, I just use: > fd '^error_log$' What do you think? |
for comparison, ripgrep has There's also |
Agreed, Concerning |
I think your option is clever enough. However, while i had to open an issue for this (after reading the help and other issues) i wonder if this won't happen in the future. While providing a new flag to use this might seem a little more work -- i think in the long run it'll just be more easier to use and discover this.. |
About the pros and cons of a glob pattern compared to a fixed string: The special chars One biggest problem of fd and my ff is that it does not warn users about the magic of regex. (I'll suggest people to use --glob and make it the default.) For better interactive experience I would suggest fzf. 😉 |
I don't think searching for a fixed string is worth adding an extra option here. It is easier to memorize that fd always search by regex, and that ^xxx$ means an exact string in regex, than to memorize an extra option. |
Just to clarify, fixed string in this context isn't equal to exact find. Fixed string just means a regular searching without treating regex meta character as special. |
Thanks for the clarification.
However, do we actually use This flag is much more useful for ripgrep, since it searches file contents, rather than file names. |
At least
|
Fix released in v6.3.0 |
First of all thank you for this. It's really fast and i'm already loving it!:)
I think
fd
should allow for exact find probably using some flag. A use case i can use to explain is when searching forerror_log
files.Using
fd error_log
returns:You can see how for example you can't use
xargs
to delete as you might delete files that are actually in use by something else.Thanks.
The text was updated successfully, but these errors were encountered: