From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1655 invoked by alias); 2 Mar 2015 08:54:58 -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: 19950 Received: (qmail 2958 invoked from network); 2 Mar 2015 08:54:46 -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=ZXrTxKU/bQSsb6SH2uX/t0R/LpcPPx1DWmR6cinJra0=; b=eLKvCVz2zdU5VNLoZr6pCQ6b3f+RxH1EvhE65s5osiJDxaMVgAwzVf3y/KSMFvbvvp dsgvLrKfeRZb7jLHyICMoGa38mJ/LiFrwyz0yamxxKnbnO8UsN6u87xEgcRNU5HgRZTC 9b0S5ZU31yTsXe+qq1b7Qrpr2yK/POcyrLOR3sD0SZR4DgbsDEW7xgL87MZr53zbVU2v M4ED9vschjWVSjvvzcQ7HJopJ8YF8I25ewFKbNVnKuil3hcznJhE9pT3HuOK9mYQZ8O2 Ire4W0+j5jqC+iDPHJGrk+4jqAQTqD/TMSCg7XPJfu/L3pXJWEwCbjKO+2LgEQGEPG3I EyxA== X-Gm-Message-State: ALoCoQkhppY5y9IvnN+ZDZj1sJ3q90bVmccE7gVNDeWEJa9X/orD7vuajSYAQb8SwM0/VTCYISmC X-Received: by 10.202.52.215 with SMTP id b206mr17556993oia.31.1425286483589; Mon, 02 Mar 2015 00:54:43 -0800 (PST) From: Bart Schaefer Message-Id: <150302005440.ZM16546@torch.brasslantern.com> Date: Mon, 2 Mar 2015 00:54:40 -0800 In-Reply-To: <20150302022754.GA7449@xvii.vinc17.org> Comments: In reply to Vincent Lefevre "Re: grammar triviality with '&&'" (Mar 2, 3:27am) References: <54F33934.2070607@eastlink.ca> <13666281425228233@web7o.yandex.ru> <54F345D3.9010204@eastlink.ca> <20150302022754.GA7449@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, 3:27am, 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? If nothing else, the errexit option would fail. With errexit, false || anything would never get beyond "false", whereas false || anything proceeds at least through "anything". You also get strange crap like while && this; do || if && that; then || thus; fi; done which would mean what, exactly? Finally if it's OK to have nothing before && / ||, then it would also be syntactically OK to write && || && || && && ... No.