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

Re: [PATCH] Tests for globbing below protected directories



On Wed, Feb 3, 2021 at 3:22 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Sorry I wasn't clear.  I was observing that the expansion of «*/*» does not
> include «foo/bar», even though the expansion of «*/bar» does include «foo/bar»
> and one might expect the expansion of «*/*» to be a superset of the expansion of
> «*/bar».  This could be surprising.

Perhaps, but that's the definition of the difference between
"readable" and "searchable" (executable) directories.  In the example
of «foo/bar», if the parent of foo is searchable but foo is only
readable, then you can expand «*» to discover foo and attempt to
"read" under «foo/» for the existence of the known name bar, but you
can't "search" foo (expand «foo/*») to discover anything, so by
extension «*/*» can't include «foo/bar».




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