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

Re: Unreadable directories aren't included in glob expansion



Bart Schaefer wrote on Thu, 09 Jan 2020 16:10 +00:00:
> On Thu, Jan 9, 2020, 7:52 AM Peter Stephenson <p.stephenson@xxxxxxxxxxx>
> wrote:
> 
> >
> > At a practical level, the difference may have arisen because a / not in
> > a glob qualifier is usually present in order to select files within the
> > directory, which won't work if the directory isn't readable.  A glob
> > qualifier, on the other hand, always applies to the final path segment.
> >
> 
> 
> I think this is exactly it.  foo/<TAB> is like asking to select from among
> the matches of foo/* and if foo is not readable, there are none.

But I'm not doing completion; I'm just echoing the result of the glob, as in «sudo ls */».



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