zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@frontiernet.net>
To: sachs@cyb.org (Josef Sachs)
Cc: zsh-workers@math.gatech.edu
Subject: Re: Parsing change between 3.0.2 and 3.0.4?
Date: Mon, 25 Aug 1997 00:20:33 -0400 (EDT)	[thread overview]
Message-ID: <199708250420.AAA03728@hzoli.home> (raw)
In-Reply-To: <199708180110.VAA11007@cyb.org> 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


      reply	other threads:[~1997-08-25  5:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-18  1:10 Josef Sachs
1997-08-25  4:20 ` Zoltan Hidvegi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199708250420.AAA03728@hzoli.home \
    --to=hzoli@frontiernet.net \
    --cc=sachs@cyb.org \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).