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

Re: [PATCH] Tests for globbing below protected directories



Bart Schaefer wrote on Mon, Feb 01, 2021 at 18:45:15 -0800:
> On Tue, Jan 26, 2021 at 3:56 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > It's a little counter-intuitive that foo/* is not a superset of foo/file.  The
> > former can't tractably discover d111/file, of course.  As to whether
> > foo/file fall back to readdir() when the directory is readable but not
> > executable
> 
> I'm not sure what you mean here.  There's no comparison of foo/* to
> foo/file ... the test case is comparing f*/* to f*/file

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.

> Does that mean there's a test case missing?

I don't know of a missing test case.

Cheers,

Daniel




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