From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43726-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 35eed539 for ; Wed, 24 Oct 2018 15:26:58 +0000 (UTC) Received: (qmail 8421 invoked by alias); 24 Oct 2018 15:26:47 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43726 Received: (qmail 27756 invoked by uid 1010); 24 Oct 2018 15:26:47 -0000 X-Qmail-Scanner-Diagnostics: from out3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.27):SA:0(-2.6/5.0):. Processed in 6.150448 secs); 24 Oct 2018 15:26:47 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=from:to:subject:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= eUXg+DW/rx8Oo9kO74HIt7yGdyeuI4cJNx0ZFsChF4M=; b=OM5CzfJSa2Niw16B +83e0FLZsqwU5jMwPRSt2m7KDIKnPhDYD5adBYZT75hqJhNtiaYjkoPe0DOT9Aiq gIBcffdC/w46zYJSLGfOlip4NrQT+PVshQpR/+NuvI5YXG/Mac8eA7ZGoqw+jC7j gS31me3agaYichiS3e/Ej8kfkSlJSfSe4fkbbOp2LC5Clk2qIaCOqTolp0obwE/M Wwfbuqmoxt9uo84O7KXPLGhCfaFsRhtdiLM6wa7vj5SEw/i/QJsF3QibbwF3bjle JKZnp4lNnw6wEmxkclWUpViL5kj3YaHXpsb/0wPsvwu3SkCLgFrf+7BHleqUkUbg Q4WV0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=eUXg+D W/rx8Oo9kO74HIt7yGdyeuI4cJNx0ZFsChF4M=; b=QlV6x1gFeWDt75jp81e1oF 6+9fI/4Xft+swFskQgkI1kfNRBcg9C8TwXQHQYfOAdntERlIHDddBmAPK/AbZPrN QlerYFwQQdk2gtBm0vm8w213u11v4eTJn+xxo/jb+A/uf8Fl17eVfs3RgHSllfG3 LQbSGxwUxOTtAz7SCAF6D+GLrkjNXPEPM5XlmNPvbJOQYJdjpYxpQkytF8lS+wA+ XZVST04QyXEIscEGLmxQnPC3P8feenasIQCV/8ZFFtjF+cQZVf2aNhfhfFkmC6N2 6ovgOrZVCI5KXv0EnMIMjAqmGqLsTiVjufL8emWF8nOh0R+b90OE0KaQl1+sZXQg == X-ME-Sender: X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] Add tests for semicolon in the middle of a sublist not terminating it. Date: Wed, 24 Oct 2018 15:17:35 +0000 Message-Id: <20181024151735.31000-1-danielsh@tarpaulin.shahaf.local2> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- These syntaxes behave this way because \n is valid after BAR / DAMPER / etc, and semicolon is equivalent to \n. I'm not sure if the meaning of these should be changed so ; terminates the sublist, or changed to be considered a syntax error, or kept this way. (I'm going to commit this anyway so we have a baseline to work from.) Matthew points out that if this behaviour is to be kept, the definition of "sublist" in zshmisc(1) should be amended to clarify that «: && ; pwd» considers 'pwd' part of the first (and only) sublist, whereas currently it implies that the semicolon terminates the sublist even in that position. Cheers, Daniel Test/A01grammar.ztst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index 217f7bea4..339ce7494 100644 --- a/Test/A01grammar.ztst +++ b/Test/A01grammar.ztst @@ -873,3 +873,13 @@ 0:Assignment-only current shell commands in LHS of pipelin >1 >1 + + echo pipe | ; sed s/pipe/PIPE/ + true && ; echo and true + false && ; echo and false + true || ; echo or true + false || ; echo or false +0:semicolon is equivalent to newline +>PIPE +>and true +>or false