Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Comment behaviour
- X-seq: zsh-workers 41495
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Comment behaviour
- Date: Sun, 6 Aug 2017 19:15:31 +0100
- 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==
- In-reply-to: <CA+rB6G+=EDHGU0_Jw8trcixGTpoV5y5im22a_5xhLX_qWdp17A@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CA+rB6G+=EDHGU0_Jw8trcixGTpoV5y5im22a_5xhLX_qWdp17A@mail.gmail.com>
On Fri, 4 Aug 2017 13:21:13 -0500
Jim <linux.tech.guy@xxxxxxxxx> wrote:
> ZSH_VERSION: 5.3.1-test-2
>
> Example code produced the following output:
> /home/user/.zshrc:<number of last line>: 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author