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

Re: _files: -/ causes caller's _alternative to be disregarded



Bart Schaefer wrote on Thu, Sep 01, 2016 at 22:03:55 -0700:
> Good catch, though normally _path_files attempts to fix up glob quals
> to avoid this.  However, doesn't (#q-/)(#q^-/) end up matching nothing?
> (I think that's WHY the aborted portion is inconsequential.)  Is that
> really what is intended here?

I don't know what is intended, but I could imagine doing it differently:
perhaps directories that match the -g pattern should be separated from
directories that don't.  For example, «_files -g "M*"» in the zsh tree
currently lists "Misc" under the "directories" tag along with all other
directories, but instead it could show "Misc" either in a new
"globbed-directories" tag [when list-dirs-first is set], or in the
existing "globbed-files" tag alongside "Makefile.in".



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