Empty brackets accepted
I assume this isn't an intentional extension:
$ ./target/debug/find \( \)
.
./.git
...
I worked on the basis "when in doubt, do what GNU's find does". I grant you that it's fairly useless behaviour, but
- it matches GNU find
- it's harmless enough
But
$ find \( \)
find: invalid expression; empty parentheses are not allowed.
Anyway, I agree it's relatively harmless to allow it.
My mistake. I tried
find /tmp ()
and killed the process before I saw "find: `()': No such file or directory"
putting a space between the brackets does indeed give an error. That should be simple enough to fix.
thanks for the bug reports by the way. Nice to see someone's looking at the code :-).
On Thu, Jun 15, 2017 at 2:35 PM, Tavian Barnes [email protected] wrote:
But
$ find ( ) find: invalid expression; empty parentheses are not allowed.
Anyway, I agree it's relatively harmless to allow it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/uutils/findutils/issues/29#issuecomment-308730899, or mute the thread https://github.com/notifications/unsubscribe-auth/ALbIF1sLPvjrBLh0Xl499vle8zGmQ71Zks5sETMcgaJpZM4N6hS7 .
Hello, I tried to solve it by adding a special judgment in the Matcher of uutils/findutils, and it seems to work. I've submitted a PR. :)