Follow-up Comment #3, bug #23920 (project findutils):
Huh? -path was added for POSIX 200x; in draft 5.1, it is line 89102. At any
rate, based on line 89051 ("Each path operand shall be evaluated unaltered as
it was provided, including all trailing <slash> characters; all pathnames for
other files encountered in the hierarchy shall consist of the concatenation of
the current path operand, a <slash> if the current path operand did not end in
one, and the filename relative to the path operand. The relative portion shall
contain no dot or dot-dot components, no trailing <slash> characters, and only
single <slash> characters between pathname components."), I argue that the
following behavior should occur:
$ find 2008/ 2001/ -path 2008/ -o -path 2001
2001/
2008/
(ie. the pattern '2008/' should match the argument '2008/', and the pattern
'2001' should match the argument '2001/')
$ find 2008 2001 -path 2008/ -o -path 2001
2001
(ie. the pattern '2008/' does not match the argument '2008')
I also argue that:
$ find . -path ./src/emacs/
will match for files within src/emacs (after all, the pattern './src/emacs/'
matches the file './src/emacs/foo.c', according to globbing), but:
$ find . -path ./src/emacs/ -prune
is worthless, since './src/emacs/' does not match './src/emacs', and -prune
is only useful on directories.
Maybe it is worth warning about trailing slash unless POSIXLY_CORRECT.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?23920>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/