From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11011 invoked by alias); 9 Sep 2016 17:01:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39258 Received: (qmail 26256 invoked from network); 9 Sep 2016 17:01:59 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(195.159.176.226):SA:0(2.5/5.0):. Processed in 0.136849 secs); 09 Sep 2016 17:01:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NML_ADSP_CUSTOM_MED,RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszd-zsh-workers@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at m.gmane.org does not designate permitted sender hosts) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Christian Neukirchen Subject: Re: [PATCH] Use == in expressions instead of the deprecated = Date: Fri, 09 Sep 2016 19:01:27 +0200 Message-ID: <87twdpaty0.fsf@juno.home.vuxu.org> References: <20160905212754.24998-1-tgyurci@gmail.com> <20160908093516.4fc2dd1e@pwslap01u.europe.root.pri> <20160908121628.78977edd@pwslap01u.europe.root.pri> <20160908143128.GA14933@chaz.gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) In-Reply-To: <20160908143128.GA14933@chaz.gmail.com> (Stephane Chazelas's message of "Thu, 8 Sep 2016 15:31:28 +0100") Stephane Chazelas writes: > 2016-09-08 12:16:28 +0100, Peter Stephenson: > [...] >> diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo >> index 3d369fb..6fcf3bd 100644 >> --- a/Doc/Zsh/cond.yo >> +++ b/Doc/Zsh/cond.yo >> @@ -103,8 +103,8 @@ 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 `tt(==)' form is the preferred one for clarity in new shell code >> +as it more closely resembles other languages. > [...] > > 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. -- Christian Neukirchen http://chneukirchen.org