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

Re: globbing in conditional expressions



Peter Stephenson wrote on Wed, May 07, 2014 at 15:44:07 +0100:
> matches=(fubar(N/F))
> [[ -z $matches ]]

All three solutions first set an array to the result of the glob.  Is
there a solution that short-circuits, i.e., that returns as soon as a
single matching filename is found?

This matters when the glob is matched against a large number of files.



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