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

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



On Thu, 8 Sep 2016 12:16:28 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> -The `tt(==)' form is the preferred one.  The `tt(=)' form is for
> -backward compatibility and should be considered obsolete.
> +The `tt(==)' form is the preferred one for clarity in new shell code
> +as it more closely resembles other languages.

It's sounding like the less of substance we say the better.

pws

diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo
index 3d369fb..474baa1 100644
--- a/Doc/Zsh/cond.yo
+++ b/Doc/Zsh/cond.yo
@@ -103,8 +103,10 @@ true if var(file1) and var(file2) exist and refer to the same file.
 xitem(var(string) tt(=) var(pattern))
 item(var(string) tt(==) var(pattern))(
 true if var(string) matches var(pattern).
-The `tt(==)' form is the preferred one.  The `tt(=)' form is for
-backward compatibility and should be considered obsolete.
+The two forms are exactly equivalent.  The `tt(=)' form is
+the traditional shell syntax (and hence the only one generally used
+with the tt(test) and tt([) builtins); the `tt(==)' form provides
+compatibility with other sorts of computer language.
 )
 item(var(string) tt(!=) var(pattern))(
 true if var(string) does not match var(pattern).



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