zsh-workers
 help / color / mirror / code / Atom feed
* Parsing change between 3.0.2 and 3.0.4?
@ 1997-08-18  1:10 Josef Sachs
  1997-08-25  4:20 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Josef Sachs @ 1997-08-18  1:10 UTC (permalink / raw)
  To: zsh-workers

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"}}

Thanks in advance.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Parsing change between 3.0.2 and 3.0.4?
  1997-08-18  1:10 Parsing change between 3.0.2 and 3.0.4? Josef Sachs
@ 1997-08-25  4:20 ` Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1997-08-25  4:20 UTC (permalink / raw)
  To: Josef Sachs; +Cc: zsh-workers

> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-08-25  5:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-18  1:10 Parsing change between 3.0.2 and 3.0.4? Josef Sachs
1997-08-25  4:20 ` Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).