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

Re: [[ as token



Achim Braemer writes:
> This would be a good idea anyway, because when zsh is invoked as ksh or
> sh, parsing should be as close to these shells as possible

Here's what I get running the ksh that came with Solaris 2.5 for x86:

$ if [[-x /usr/local/bin/zsh]]; then echo hi; fi
ksh: [[-x:  not found
$ if [[ -x /usr/local/bin/zsh]]; then echo hi; fi
ksh: syntax error: `;' unexpected
$ if [[ -x /usr/local/bin/zsh ]]; then echo hi; fi
hi

So it looks like we're now much more compatible with ksh and sh (sh treats
"[[-x" the same way, though of course it doesn't parse "[[" by itself).

I think this is a positive step, but then I don't have any scripts that
broke because of this.  We can only guess what the collective response
to this will be.

..wayne..



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