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

Re: *(@)/subdir expansion



Andy Isaacson wrote:
> I'm suprised to find that this expansion doesn't work for me:
> 
> % ls *(@)/dry
> zsh: no matches found: *(@)/dry
[...]
> Am I doing something wrong, is this expected behavior, or is it a bug?

You expect glob qualifiers to work in the middle of a pattern
which they do not as explained in the zshexpn man page (see the
section about "Glob Qualifiers"):
   Patterns  used for filename generation may end in a list of
   qualifiers enclosed in parentheses.

Your pattern does not end in a list of qualifiers enclosed in
parentheses, because after the parentheses, there is some more
stuff. Seems you're out of luck here...

You might want to try something like
   for i in *(@) ; do ls $i/dry 2>/dev/null ; done

> -andy

Ciao,
Thomas

-- 
 Thomas Köhler       Email:       jean-luc@xxxxxxxxxxxxxxxxx
     <><             WWW:           http://jeanluc-picard.de
                     IRC:                           tkoehler
                     PGP public key available from Homepage!

Attachment: signature.asc
Description: Digital signature



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