Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Comment behaviour



On Sun, 6 Aug 2017 11:59:53 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sun, Aug 6, 2017 at 11:15 AM, Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> wrote:
> >
> > 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.
> 
> It's a parse error because "}#" is not a "}" token and the script
> _ends_ after that, so no matching "}" is ever found.  I don't think
> you want to parse "}#" as two separate tokens.

The question arises in this particular case because it's in command
position so only certain special syntax is valid.  But it seems like
the following is currently valid, if stupid:

% alias "}#"='echo "Hello"'
% {
cursh> }#
cursh> }
Hello

so we can't change it without repercussions.

pws



Messages sorted by: Reverse Date, Date, Thread, Author