-
-
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
feature request: allow specifying multiple search paths #166
Comments
For example, here is my today's use case: I'm looking for the presence of a certain .so library file in the dropbox versions present on my nixos system; I would like to simply do: |
Second that request. Passing a listing collected by |
@sharkdp, mind if I take this on? |
@Doxterpepper That'd be great! |
I'm not sure whether this is a good idea. If BTW, NixOS use symlinks extensively, so you might need |
This is probably a matter of pragmatism.
You are right, but I needed this on the command line, after knowing that the expansion is not empty. Then the alternative I had to resort to was no better in this respect (I don't remember if I used |
This is a matter of design, and the intention is to reduce potential surprises or pitfalls. It is especially important for a tool intended to replace a fundamental utility like I'd suggest a new syntax for this: |
@ChengCat, I don't think "expanding to an empty string" is a thing. I'm pretty sure wildcards are handled by your shell and give an "Error: *foo* is not a directory" if the wildcard expression does not match anything. At least that's what I see in bash. I don't know how other shells might handle wildcards but I imagine they're all similar. |
@Doxterpepper exactly. The shell will either immediately thrown an error: zsh> echo drop*
zsh: no matches found: drop* or just leave the wildcard as is: bash> echo drop*
drop* In the second case, we are also fine since 'drop*' does not exist as a directory, so fd will throw an error. |
I confirm that my fish shell also throws out an error. I didn't know about this, thanks for pointing this out. |
Closed via #182 |
I.e.
fd [pattern] [path [path ...]]
. I don't foresee a need to specify a 3rd argument tofd
which would not be a search path, so allowing multiple paths seems harmless and useful. Also, by compatibility withfind
, would there be a problem to not error if the provided paths are files (i.e. not directories)?The text was updated successfully, but these errors were encountered: