From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28110 invoked by alias); 2 Mar 2015 03:53:33 -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: 19945 Received: (qmail 15915 invoked from network); 2 Mar 2015 03:53:31 -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,HTML_MESSAGE, 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:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=MOBXgXG1TExnBaSge2PfAkN+Rlg2XBj8b/lhURM8st8=; b=aschkoH+ARTFSvD170c0ZhLeS64KxNU2xAfyDnsODWrhaxpws0LRYUaa/MuUX5RNAX sIlkyfZwBtxR7ZJnuHbXqf55BihbPUiLYEioCqTv+WOII5AcEaX3nR2CC6CbhWrt/fvU 060I6ep6f8BnM3nxCcK7bHKOi0hAmKwiPhZ9nQY+onoMDcQE/usKifEuBa6UBguG2ZeG khoQNzPLEUdRGCyTdW2WBtzJjaGiaw5dl2WpxZrl54Y3dEgy3ypzeKFjdstlP3h6FR6B XiPH4jDsOA7Pkc4LPxsxaeIvlr1EpAWLIBwEU0izjw1KNVM0UZLGTdcJJMJznCY0Z9Nw 0d5g== X-Gm-Message-State: ALoCoQmIA6uIEWXK+2eDMw5ahE3CUHVhfa66n+QAJy/YU7ZhtHfilrHp4KokReEKGVt2k6CePkI7 MIME-Version: 1.0 X-Received: by 10.112.155.137 with SMTP id vw9mr22355549lbb.70.1425268408446; Sun, 01 Mar 2015 19:53:28 -0800 (PST) In-Reply-To: <20150302022754.GA7449@xvii.vinc17.org> References: <54F33934.2070607@eastlink.ca> <13666281425228233@web7o.yandex.ru> <54F345D3.9010204@eastlink.ca> <20150302022754.GA7449@xvii.vinc17.org> Date: Sun, 1 Mar 2015 19:53:28 -0800 Message-ID: Subject: Re: grammar triviality with '&&' From: Kurtis Rader To: Zsh Users Content-Type: multipart/alternative; boundary=089e01228a9432158505104629e2 --089e01228a9432158505104629e2 Content-Type: text/plain; charset=UTF-8 On Sun, Mar 1, 2015 at 6:27 PM, Vincent Lefevre wrote: > However "&& [ -e file2 ]" could constitute a list too. There is > currently a parse error, but zsh could have an extension to accept > it as being equivalent to: "[[ $? -eq 0 ]] && [ -e file2 ]". Would > there be anything wrong with such an extension? > > Similarly, "|| X" could be regarded as equivalent to > "[[ $? -ne 0 ]] || X" by zsh. > How often would such a feature be useful? Very infrequently in my opinion. Furthermore, it is almost guaranteed to cause anyone reading the statement to wonder if the author made a mistake as the idiom is unlike anything else I can think of in Bourne style shells. I believe the benefits don't justify the costs of the feature. -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank --089e01228a9432158505104629e2--