From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23008 invoked by alias); 19 Feb 2018 22:47:22 -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: 23150 Received: (qmail 1022 invoked by uid 1010); 19 Feb 2018 22:47:21 -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(-2.6/5.0):. Processed in 6.020571 secs); 19 Feb 2018 22:47:21 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham 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=qjCb13uZekNwlhHqrvQA: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> From: Ray Andrews Message-id: Date: Mon, 19 Feb 2018 14:47:12 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-reply-to: <20180219215726.4c25cc7d@ntlworld.com> Content-language: en-CA On 19/02/18 01:57 PM, Peter Stephenson wrote: > You never need to use output from ls in a shell Yeah, I was just trying to make a fast list of something to filter. Mind, I do tend to forget about zsh's internal power when it comes to that sort of thing so the reminder is welcome. > Do you mean just "true"? Not sure what putting this in square brackets Right, 'true' and 'false' live without any syntactic wrapping.  I forgot. > is supposed to achieve. It does work, but purely by virtue of the fact > > You can affect the precedence with braces, but they need to surround the > "&&" or "||" expression you want to protect. In your case you've simply > surrounded a pipeline which would be run in one go anyway: That's my question, could my code be made to work more or less as it is?  I was expecting the braces to work.  Otherwise I fairly well understand the basic rules esp. the left>right thing, it really does make life a bit simpler.  Mind, I suppose that since return values are always suspect perhaps an if/else construction really is just better.