Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Ignore EACCES when doing non-pure globbing



On Tue, Jan 12, 2021 at 5:12 PM Devin Hussey <husseydevin@xxxxxxxxx> wrote:
>
> So, both the pre-patch and post-patch behaviors are noncompliant. The first is too strict and this is too lenient (although I prefer more lenient than strict). Back to the drawing board, I guess.

There are options (shglob, shfileexpansion, no_nomatch, etc.)
controlling whether the globbing behavior does or does not conform to
POSIX.  It's not a problem that "no matches found" is printed when the
shell is not in POSIX mode.  It would be a problem if "too many"
matches were found when the shell IS in POSIX mode.  So it may be that
any patch here has to take one or more of those setopts into account.

That said, the POSIX requirement is only that any "component that
contains a pattern character" must have read permission on the
directory containing it.  A "component" here is what appears between
two "/" (or after the rightmost one).  So I don't think there was a
problem with that requirement.




Messages sorted by: Reverse Date, Date, Thread, Author