Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Use == in expressions instead of the deprecated =
On 2016-09-08 16:14:10 +0100, Peter Stephenson wrote:
> So possibly even saying == is preferred is going a bit far, though
> obviously there's no reason ever to remove it...
I don't mind what is preferred, but zsh should be consistent, and
currently it isn't:
In the man pages:
string = pattern
string == pattern
true if string matches pattern. The `==' form is the preferred
one. The `=' form is for backward compatibility and should be
considered obsolete.
But "==" is converted to "=":
zira% f() { [[ a == a ]] }
zira% which f
f () {
[[ a = a ]]
}
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author