Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Use == in expressions instead of the deprecated =
2016-09-09 19:01:27 +0200, Christian Neukirchen:
[...]
> >> -The `tt(==)' form is the preferred one. The `tt(=)' form is for
> >> -backward compatibility and should be considered obsolete.
[...]
> > ksh93 also makes "==" obsolete in [[...]].
>
> My ksh93 (ksh-2012.08.01) man page says:
>
> Conditional Expressions.
> A conditional expression is used with the [[ compound command to test
> attributes of files and to compare strings.
> ...
> string == pattern
> True, if string matches pattern. Any part of pattern can be
> quoted to cause it to be matched as a string. With a successful
> match to a pattern, the .sh.match array variable will contain
> the match and sub-pattern matches.
> string = pattern
> Same as == above, but is obsolete.
[...]
Sorry, that's what I meant and I ended up saying the opposite.
ksh93 also (like zsh) makes "=" obsolete. I assumed the zsh
manual was making = obsolete because ksh did as well (that
[[...]] construct comes from ksh).
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author