From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7118 invoked by alias); 2 Mar 2015 16:50:06 -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: 19956 Received: (qmail 3684 invoked from network); 2 Mar 2015 16:50:05 -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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=sTg7MnFcshoE30NYz2kmNlsY+RHkAomh1xH1q5kdTPI=; b=Hyz0nGKOSqsNiE6C24tiWl5B2ViqS2/mvWKMH0k9jJfAyvjYj7lKJo7w0A5DltuTou c9JEdV/hwDmzf0zrsQz1KPN/mChVa5v3wCNOniDHU0AtQUoxygtmaP9jglumtqKRNhmE bn07CGkuA1JYh9sGQPBqHOuKAhs58u9gdWGdMV8NJPzk/RevSwtpo07hV4Gn+zMZN9K5 x4k9LL6LmW0fnD4Iwju3Hq7cAwLQ1eQn0+bkGKMwZUQBWC0tiEPrbN+DCZ4rzsvI+qMy uLhHp6DjTa/L8TxDlebX3A/+AcITVrF9cXPtcEnHlGtSVNAzI4XwnouTX8EEBjeZPy58 ntXQ== X-Gm-Message-State: ALoCoQntGZ1EB6vyQ9gpTRdw4+PL2gVU7vJSHLjfxguJSZwgLgZblu2GZB1y8BHTdaFTmAkW9k2H X-Received: by 10.60.96.167 with SMTP id dt7mr19628535oeb.54.1425315002752; Mon, 02 Mar 2015 08:50:02 -0800 (PST) From: Bart Schaefer Message-Id: <150302084958.ZM17306@torch.brasslantern.com> Date: Mon, 2 Mar 2015 08:49:58 -0800 In-Reply-To: <20150302103156.GB6869@xvii.vinc17.org> Comments: In reply to Vincent Lefevre "Re: grammar triviality with '&&'" (Mar 2, 11:31am) 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> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: grammar triviality with '&&' MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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! } > You also get strange crap like } > } > while && this; do || if && that; then || thus; fi; done } > } > which would mean what, exactly? } } while [[ $? -eq 0 ]] && this; do [[ $? -ne 0 ]] || if [[ $? -eq 0 ]] && that; then [[ $? -ne 0 ]] || thus; fi; done Yes obviously that's what you intend the literal interpretation to be, but in what way is it sensibly meaningful in an actual program? } > Finally if it's OK to have nothing before && / ||, then it would also be } > syntactically OK to write } > } > && || && || && && ... } } I disagree. Only a && or || as the first word of a list would have } a special meaning. You can't escape the lunacy that easily: && { || { && { || { && { && ... } } } } }