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

Re: Maildir empty?



    Hi Klaus :)

 * Klaus Wacker <wacker@xxxxxxxxxxxxxxxxxxxxxx> dixit:
> > > > Does this do what you want:
> > > >       if [ -z $i/*/*([1]) ]
> > > > You need to use the single brackets so that the $i/*/* is treated as a
> > > > filename expansion.
> >     Why are single brackets needed here instead of [[ -z ... ]]? Why
> > with single brackets the $i/*/* construction is treated as a filename
> > expansion? Is it not using double brackets?
> I can only give a partial answer. `[' is treated like any other
> command, so its arguments are subject to filename expansion.

    Yes, I know, it happens even with the builtin '['.

>`[[...]]' is a real shell construct with its own syntax and rules.
> Don't ask me what exactly the rules are, but essentially they are
> geared more towards pattern matching than file globbing, if I
> remember correctly.

    OK, that's a good explanation :)) Thanks a lot!

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/



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