From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27510 invoked by alias); 8 Sep 2016 19:08:08 -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: 39245 Received: (qmail 27457 invoked from network); 8 Sep 2016 19:08:08 -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.119717 secs); 08 Sep 2016 19:08:08 -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: Stephane Chazelas Subject: Re: [PATCH] Use == in expressions instead of the deprecated = Date: Thu, 8 Sep 2016 19:47:40 +0100 Message-ID: <20160908184740.GA16973@chaz.gmail.com> References: <20160905212754.24998-1-tgyurci@gmail.com> <20160908093516.4fc2dd1e@pwslap01u.europe.root.pri> <20160908121628.78977edd@pwslap01u.europe.root.pri> <20160908143128.GA14933@chaz.gmail.com> <20160908161410.46897ece@pwslap01u.europe.root.pri> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mutt/1.5.21 (2010-09-15) Content-Disposition: inline In-Reply-To: 2016-09-08 18:39:55 +0200, Mikael Magnusson: [...] > >> 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). > > POSIX doesn't have [[...]] so what it says isn't really relevant. [ a > == b ] doesn't work in zsh by default either, you have to use either [ > a = b ] or [ a \== b ] and obviously the latter is pretty ridiculous. > :) [...] I only said "==" was not POSIX *for the "test"/"[" utility (or expr)*. It's not relevant to [[...]] except that [[..]] was more or less the "[" utility moved to a new shell construct to avoid some of the issues with the interpretation of the arguments of the "[" command (most of which have later been fixed by POSIX). Now, I agree, given that [ a == b ] doesn't work in zsh when not in sh emulation, that's one more reason zsh maybe shouldn't consider [[ a = b ]] as obsolete. AFAICT, none of mksh, pdksh, yash, bash consider [[ = ]] obsolete ([ = ] for yash which doesn't have [[ ]]). -- Stephane