From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9081 invoked by alias); 20 Feb 2018 16:27:01 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23152 Received: (qmail 2787 invoked by uid 1010); 20 Feb 2018 16:27:01 -0000 X-Qmail-Scanner-Diagnostics: from mta03.eastlink.ca 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(24.224.136.9):SA:0(-1.1/5.0):. Processed in 11.125279 secs); 20 Feb 2018 16:27:01 -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=-1.1 required=5.0 tests=BAYES_00,DATE_IN_PAST_06_12, RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=utf-8; format=flowed X-Authority-Analysis: v=2.3 cv=dfKuI0fe c=1 sm=1 tr=0 a=RnRVsdTsRxS/hkU0yKjOWA==:117 a=RnRVsdTsRxS/hkU0yKjOWA==:17 a=IkcTkHD0fZMA:10 a=JflIsiEqWjLUdvPywJwA:9 a=QEXdDO2ut3YA:10 X-EL-IP-NOAUTH: 24.207.101.9 Subject: Re: &&|| To: zsh-users@zsh.org References: <64c5472a-b174-00b6-7ab0-b65d664be675@eastlink.ca> <20180219215726.4c25cc7d@ntlworld.com> <20180220092659.2233e6ef@pwslap01u.europe.root.pri> From: Ray Andrews Message-id: Date: Mon, 19 Feb 2018 23:54:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-reply-to: <20180220092659.2233e6ef@pwslap01u.europe.root.pri> Content-language: en-CA On 20/02/18 01:26 AM, Peter Stephenson wrote: > I think you were trying to make the status depend only on what was > before the first "&&". You can certainly do But isn't that exactly what I did do?  Appending to you code below: > first-statement && { > any-old-stuff > } || {something-else-entirely} Yet the return value of any-old-stuff (egrep in practice) was what actually controlled something-else-entirely.  I'm not expecting the pipes within any braced structure to make any difference.  Is that what's happening?  Is so, how/why?  Do not the braces pointedly force the entire structure to be subordinate to the first '&&'?  It seems to me that the left>right association in my original code is sorta 'brutally' adhered to in such a way that the natural meaning of the braces is violated such that any-old-stuff has control of branching when the natural logic is that first-statement has it.  Yes? No? if first-statement; then     { any-old-stuff} else     {something-else-entirely} fi That works fine egrep and/or pipes notwithstanding, yet I'm expecting both to work the same.  You seem to suggest they should as well.