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

Re: Suppressing "no matches found" Glob Message?



    Hi Lloyd :)

    Has been a long time since our last email :))) I'm happy to hear
from you again :)

 * Lloyd Zusman <ljz@xxxxxxxxxx> dixit:
> >     function special_ls() {
> >
> >         emulate -L zsh
> >         setopt NOMATCH
> >
> >         ls **/*(.) >& /dev/null
> >
> >         return 0
> >     }
> That will print nothing _except_ a possible error message!

    O:)) Sorry, I used >& instead of the correct 2> I was writing
this in a hurry O:)
 
> How about this?
> 
>     function special_ls() {
> 
>         emulate -L zsh
>         setopt NOMATCH
> 
>         { ls **/*(.) } 2>/dev/null
> 
>         return 0
>     }

    Perfecto ;))

    Best regards, Lloyd :)

    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