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

Re: [PATCH] Use == in expressions instead of the deprecated =



2016-09-08 15:31:28 +0100, Stephane Chazelas:
[...]
> ksh93 also makes "==" obsolete in [[...]]. "==" is still not
> POSIX (and likely not going to be soon as requests to add it
> have been rejected (IIRC)) for the "test"/"[" utility (or expr).
[...]

Sorry, bad memory. Though there was some opposition, the "=="
proposal was not rejected:
http://austingroupbugs.net/view.php?id=375 was what I was
vaguely recalling.

It's still possible that the next major POSIX spec will have
[ == ] and maybe even [[ ]].

You guys may want to comment on the latest proposal there:
http://austingroupbugs.net/file_download.php?file_id=31&type=bug

as it would make zsh non-conformant.

In particular, it  proposes specifying [[ =~ ]] the ksh/bash
way, that is where quoting escapes regexp operators (
[[ a =~ "." ]] returns false) and [[ < ]] required to use
collation.

-- 
Stephane



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