From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28891 invoked by alias); 4 Sep 2013 20:21:21 -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: 31697 Received: (qmail 867 invoked from network); 4 Sep 2013 20:21:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at case.edu designates 129.22.105.36 as permitted sender) Message-ID: <522794C8.1040804@case.edu> Date: Wed, 04 Sep 2013 16:15:04 -0400 From: Chet Ramey Reply-To: chet.ramey@case.edu Organization: ITS, Case Western Reserve University User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Bart Schaefer CC: zsh-workers@zsh.org, chet.ramey@case.edu Subject: Re: Builtin test and parsing of conditionals References: <130904091503.ZM28369@torch.brasslantern.com> <20130904173159.19c55cd1@pwslap01u.europe.root.pri> <130904103940.ZM28454@torch.brasslantern.com> In-Reply-To: <130904103940.ZM28454@torch.brasslantern.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Junkmail-Status: score=10/50, host=mpv5.cwru.edu X-Junkmail-Whitelist: YES (by domain whitelist at mpv1.tis.cwru.edu) On 9/4/13 1:39 PM, Bart Schaefer wrote: > } So where does the > } implicit comparison come from? If -a were taken as high precedence you > } might read it as > } > } test -n ! -a n ! > } test -n ! -a n ! > > Presuming you mean -a -n there, this is exactly how the austin-group > thread claims it should be interpreted, and is reportedly how ksh and > bash and GNU /usr/bin/test all interpret it. The rules, at least through four arguments, are well-defined. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128 -a and -o are binary primaries. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/