Idea: orthogonal specification of patterns and paths · Issue #889 · sharkdp/fd (original) (raw)

Thanks for creating this very useful alternative to classic find!

Here, I suggest an improvement to the user interface that would make it both simpler and more powerful.

(This idea requires breaking backwards compatibility, but I believe that this would pay off. There are different ways in which such a backward-incompatible change could be realized without surprising current users, so please bear with me.)

I suggest that search paths be provided as a command line option (for example -r --root) and no longer as command line arguments that follow the pattern. Thus, any non-option command line arguments would be search patterns. This would allow providing zero, one or an arbitrary number of search patterns. If more than one search pattern was provided, these would be combined using logical AND.

This change would have the following advantages: