From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29173 invoked by alias); 6 Aug 2017 18:15:38 -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: X-Seq: 41495 Received: (qmail 27820 invoked by uid 1010); 6 Aug 2017 18:15:38 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-10.server.virginmedia.net 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(80.0.253.74):SA:0(-2.8/5.0):. Processed in 2.22106 secs); 06 Aug 2017 18:15:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Originating-IP: [86.21.219.59] X-Authenticated-User: p.w.stephenson@ntlworld.com X-Spam: 0 X-Authority: v=2.1 cv=SeoKDalu c=1 sm=1 tr=0 a=utowdAHh8RITBM/6U1BPxA==:117 a=utowdAHh8RITBM/6U1BPxA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=pGLkceISAAAA:8 a=HOW4JjWrB7P_mrbX0AgA:9 a=CjuIK1q_8ugA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 Date: Sun, 6 Aug 2017 19:15:31 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Comment behaviour Message-ID: <20170806191531.15dfad23@ntlworld.com> In-Reply-To: References: X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1502043331; bh=xTxg6oXs8fv5C1NHw6zFTCrIMjvOkOwPawKNJCqe/WQ=; h=Date:From:To:Subject:In-Reply-To:References; b=Yu4EojK1YmIxxqb5h8wFUYBp3PVX5ADaOVFbBesxRIbpk0OJFwhpeetS7UxWgYTFN vZDp+8Gf6ghQrPisnFu58PIOeM3esxAIj2ojaXn9K9Ue89fPPm2Tbpx1ILhMEcdWjz CQFR+lsoH33/56g8DXLZi4InEgSqIrASovoGTg8s7eEJ3tslguR5ijWyMhQh16TR9U IwkFVo5L2DguYRIgfMiazGVijcvT1HB2hVHdCH/ZI3Gn76ZcUEVwa3RyegV5DU3eDb fKaLybPE1WDB7VMKCydjzJTTHF/TMOXkjJArgXLQbZZdI1sHXPFYJRqUYEGrmJzEgk mQOZ5qbtEojiQ== On Fri, 4 Aug 2017 13:21:13 -0500 Jim wrote: > ZSH_VERSION: 5.3.1-test-2 > > Example code produced the following output: > /home/user/.zshrc:: parse error near `\n' > > [ -f /bin/zsh ] && { > # code > }# A comment. <<<--- point of error(no space after brace) > IF > } # A comment. <<<--- no error(space after brace) > > Also checked "(#", ")#", and "{#" with no errors. FWIW > > BUG or did I miss something in the man page? # after a brace in > a nested statement would be valid, but didn't expect it here. Generally, you can't rely on being able to put a "#" after a command argument with no space and have it treated as starting a quote, so whether it's a bug or not is somewhat philosophical. I'll have a closer look after the release if this particular case can be treated differently, however --- it's clearly not useful to have it treated as a parse error if it's easy to do it otherwise. pws