Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Parsing change between 3.0.2 and 3.0.4?
- X-seq: zsh-workers 3457
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxxxxxxx>
- To: sachs@xxxxxxx (Josef Sachs)
- Subject: Re: Parsing change between 3.0.2 and 3.0.4?
- Date: Mon, 25 Aug 1997 00:20:33 -0400 (EDT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199708180110.VAA11007@xxxxxxx> from Josef Sachs at "Aug 17, 97 09:10:25 pm"
> Was there some change in parsing between 3.0.2 and 3.0.4 that causes me
> to get this error message:
> parse error near `\n'
> when sourcing a file containing this:
> [ "${(M)TERM#xterm}" = xterm ] && \
> {stty -istrip -ixon ; function chpwd {print -Pn "\e]2;%m: $PWD\C-g"}}
Yes, there were some brace related changes since 3.0.2 since
IGNORE_BRACES did not work properly in some cases. Now the closing brace
has to be followed by a blank or one of ; | &
[ "${(M)TERM#xterm}" = xterm ] && \
{stty -istrip -ixon ; function chpwd {print -Pn "\e]2;%m: $PWD\C-g"} }
But the proper syntax required by POSIX is
[ "${(M)TERM#xterm}" = xterm ] && \
{ stty -istrip -ixon ; function chpwd {print -Pn "\e]2;%m: $PWD\C-g";};}
That works even if IGNORE_BRACES is set. I'd strongly recommend using
this syntax.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author