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

Re: Re: is this really correct



>   What is the "preferred" way of testing strings that may be arbitrarily
>   input then given the above ? I mean one does not know what 'a' is until
>   you do a test on it right ?

As I said I'll modify [ ... ] according to POSIX which will fix this
problem (maybe it was not clear that test and [ are the same).  But in zsh
one can use

% a="-s"; if [[ "$a" = "-s" ]] then echo "yeh" ; fi

which should work with all zsh versions.

Zoltan




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