From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5127 invoked by alias); 2 Mar 2015 18:08:21 -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: X-Seq: 19957 Received: (qmail 7050 invoked from network); 2 Mar 2015 18:08:17 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=jzv7pUNyk+0Y+COVCE1LmA==:117 a=jzv7pUNyk+0Y+COVCE1LmA==:17 a=VNsaWKQvMhEA:10 a=N659UExz7-8A:10 a=Uxf-25FTTGc3lFTuKqcA:9 a=pILNOxqGKmIA:10 Message-id: <54F4A003.5080000@eastlink.ca> Date: Mon, 02 Mar 2015 09:38:11 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: grammar triviality with '&&' References: <54F33934.2070607@eastlink.ca> <13666281425228233@web7o.yandex.ru> <54F345D3.9010204@eastlink.ca> <20150302022754.GA7449@xvii.vinc17.org> <150302005440.ZM16546@torch.brasslantern.com> <20150302103156.GB6869@xvii.vinc17.org> <150302084958.ZM17306@torch.brasslantern.com> In-reply-to: <150302084958.ZM17306@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 03/02/2015 08:49 AM, Bart Schaefer wrote: > On Mar 2, 11:31am, Vincent Lefevre wrote: > } Subject: Re: grammar triviality with '&&' > } > } On 2015-03-02 00:54:40 -0800, Bart Schaefer wrote: > } > > } > If nothing else, the errexit option would fail. With errexit, > } > } I agree that's not equivalent, but this would not be a problem > } in a "if ... then" construct (though I think it's a bad idea > } to use such a feature here). > > Except that's exactly where Ray wants to use it! Prezactly. My thinking is (surprise!) C-ish--the newline should be irrelevant. Just as one can end a line with && so should one be able to begin a line the same way, same logic. If there is a real monster hiding under the bed tho with this 'errexit' thing, then any tinkering could really break something. Or maybe it could be a feature ... but it's in 'Kurtis' territory, i.e. we'd need to be very careful. Nope, I was thinking of " && [ -e file ] " being simply the logical equivalent of " [ -e file ] && " ... if in the latter case the syntax 'folds' itself around to the next line, then I'd expect that the opposite situation might also be legal. A pipe must have commands/statements pre and post, no? We already permit the 'post' to be on the next line, so I'm just thinkin' that the 'pre' could be on the previous line in the same way. No gotchas!