From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1922 invoked by alias); 20 Feb 2018 17:18:05 -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: 23153 Received: (qmail 10657 invoked by uid 1010); 20 Feb 2018 17:18:05 -0000 X-Qmail-Scanner-Diagnostics: from mailout1.w1.samsung.com 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(210.118.77.11):SA:0(-1.9/5.0):. Processed in 12.231164 secs); 20 Feb 2018 17:18:05 -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.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180220170739euoutp0113cbbdd5a2db04abba68b2ced5e7df4e~VF6f2MzT_2218122181euoutp01V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1519146459; bh=0/nPCnSXMNyDWU7Lr9vJ1yhCKcruongWJXbQwqjRU00=; h=Date:From:To:Subject:In-reply-to:References:From; b=Vc0k8US8nddOTLzOIGuu7u4n0WXPnK1BqvpUJvxpVAHKwl9eDqIHz2kSIXsIblffe gO5Q0mj+WqmiIq0TaKO3aIU/BCnC2I9IvRFxzYiIQnhODdwTKVEwjTclv9mHiB7/Xs 0Z3HZO6Ex9XxFM6qIBPGZR5ars5Q0b3VHCz3oHU4= X-AuditID: cbfec7f4-6f9ff700000043e4-81-5a8c55da2477 Date: Tue, 20 Feb 2018 17:07:34 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: &&|| Message-id: <20180220170734.7f428bd6@pwslap01u.europe.root.pri> In-reply-to: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMIsWRmVeSWpSXmKPExsWy7djP87q3QnuiDDo+S1rsOLmS0YHRY9XB D0wBjFFcNimpOZllqUX6dglcGesm+hRs5K5Yv2kDawPjR44uRk4OCQETiYV3z7F1MXJxCAms YJR4d+Y0K0hCSKCbSeLNZz6Yot2f77BDFC1jlDjw+huUM4VJ4sWMRijnDKPEp8ntULPOMko8 uPOSGaSfRUBVovfNc0YQm03AUGLqptlgtoiAqMTyFZvZQWxhAUGJ90dngsV5Bewlvi4+Dhbn BLKnL70GdhO/gL7E1b+fmCBuspeYeeUMVL2gxI/J91hAbGYBHYlt2x6zQ9jyEpvXvGWGqJ/A JtHzqRzCdpFYNLObHcIWlnh1fAuULSPR2XEQan4/o8STbl+QZyQEZjBKnD6zgw0iYS3Rd/si I8QCPolJ26YDLeAAivNKdLQJQZR4SDx6vx9qjqPEoi0nmSBheptJonul6gRG+VlIzp6F5OxZ SM5ewMi8ilE8tbQ4Nz212CgvtVyvODG3uDQvXS85P3cTIzDqT/87/mUH464/SYcYBTgYlXh4 Xxj0RAmxJpYVV+YeYpTgYFYS4b38vTtKiDclsbIqtSg/vqg0J7X4EKM0B4uSOG+cRl2UkEB6 YklqdmpqQWoRTJaJg1OqgZGnqMo0NuCRVxEfe9P+HHVb98fRKtVNU0IeNDcelT2sV+NrHi29 3meSV9tWv2vJzyQZ/vw9M3PD5GXzf9cwTpjoxhF42kFE7Hnv7Q0aslbipxbY6e3ieC+15LPG mTfdzo3n4rIU+9y9p36av+xt2f/jx0WCPlSEex34KnR6CffU9L07rV05vZVYijMSDbWYi4oT Aa0POjf2AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCLMWRmVeSWpSXmKPExsVy+t/xy7o3Q3uiDHadV7PYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4MtZN9CnYyF2xftMG1gbGjxxdjJwcEgImErs/32HvYuTiEBJY wihxt20qI4QzjUmi5cAHqMw5RonPd5rZIJyzjBJzfi1gAelnEVCV6H3znBHEZhMwlJi6aTaY LSIgKrF8xWZ2EFtYQFDi/dGZYHFeAXuJr4uPg8U5gezpS6+xQgy9zSTxu/E72FB+AX2Jq38/ MUEcaC8x88oZqGZBiR+T74HVMAtoSWze1sQKYctLbF7zlhnEFhJQl7hxdzf7BEahWUhaZiFp mYWkZQEj8ypGkdTS4tz03GJDveLE3OLSvHS95PzcTYzAsN127OfmHYyXNgYfYhTgYFTi4bXQ 6YkSYk0sK67MPcQowcGsJMJ7+Xt3lBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHe8waVUUIC6Ykl qdmpqQWpRTBZJg5OqQbGrIuXNV4FXr0axnpw81pFs39TWaabLdpqmHeExe8A31U129CUqUfm rVc+oC9y235n4fTWeSXcN3r+89rvuH/mhvzuDXLnPsSHy17d7SEs5LQzslZMK/nHyg9h2oXL TcWZBJQW+t5XfG+vMfPc2qCt0Q17r/9njeE+t1zWe6HDbdWIo6f6PZazKbEUZyQaajEXFScC AI+kYkNXAgAA X-CMS-MailID: 20180220170737eucas1p1f67e26e338bc28c588563cd0739d3f83 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180219224853epcas1p1db63db3e55fdede639955348264f21aa X-RootMTR: 20180219224853epcas1p1db63db3e55fdede639955348264f21aa References: <64c5472a-b174-00b6-7ab0-b65d664be675@eastlink.ca> <20180219215726.4c25cc7d@ntlworld.com> <20180220092659.2233e6ef@pwslap01u.europe.root.pri> On Mon, 19 Feb 2018 23:54:38 -0800 Ray Andrews wrote: > 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? No. > Appending to you code below: > > > first-statement && { > > any-old-stuff > > } || {something-else-entirely} The status of first-statement only controls what's *inside* the { }. That's what I showed. You've now stuck something after it. That's got completely different rules, interacting both with the && outside the braces as well as the last status from within the braces. You've now extended your demand so that it works with an else clause as well. That can't be done simply by combining &&s and ||s on the same level (without other fix-ups) because they don't have the same rules. You could do this, I suppose. first-statement && { any-old-stuff true } || {something-else-entirely} That works because - if you don't execute first-statmement, you go direct to what's following the "||"; - if you do execute it you then get to the true, which is the last status for the brace, which causes what's following the "||" to be ignored. But you'd probably be (as my father would have said) stotting bonkers. Though it is a pretty good illustration of the difference between the two cases. pws