From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19468 invoked by alias); 1 Mar 2015 16:07:24 -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: 19935 Received: (qmail 7230 invoked from network); 1 Mar 2015 16:07:20 -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, T_HDRS_LCASE,T_MANY_HDRS_LCASE autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=v3jdlwE+mftNnR1sUa1KMQ==:117 a=v3jdlwE+mftNnR1sUa1KMQ==:17 a=VNsaWKQvMhEA:10 a=IkcTkHD0fZMA:10 a=DKKTNYRHLngKrI5EVDUA:9 a=QEXdDO2ut3YA:10 Message-id: <54F33934.2070607@eastlink.ca> Date: Sun, 01 Mar 2015 08:07:16 -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 Subject: grammar triviality with '&&' Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit I notice that zsh is quite tolerant as far as most line wrap situations go, except for this: [ -e file1 ] && [ -e file2 ] && echo 'both files exist' ... good [ -e file1 ] && [ -e file2 ] && echo 'both files exist' ... syntax error, but we can fix it like this: [ -e file1 ]\ && [ -e file2 ]\ && echo 'both files exist' I'm wondering why the line continuation is strictly necessary. IOW, why doesn't the parser permit the '&&' on a new line? I've been trying to come up with something that would cause an ambiguity if it were permitted, but can't find anything, but I doubt the rule would be there otherwise.