Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: \} parse error in 3.0.3-test4
- X-seq: zsh-workers 2838
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: roderick@xxxxxxxx (Roderick Schertler)
- Subject: Re: \} parse error in 3.0.3-test4
- Date: Wed, 29 Jan 1997 00:28:41 +0100 (MET)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <18699.854481789@xxxxxxxxxxxxxxxxx> from Roderick Schertler at "Jan 28, 97 03:03:09 pm"
> Here's a parse error in 3.0.3-test4 which wasn't in 3.0.2:
>
> $ zsh-3.0.2 -fxc 'eval last=\$\{$#\}' foo bar
> + eval last=${1}
> + last=bar
>
> $ zsh-3.0.3-test4 -fxc 'eval last=\$\{$#\}' foo bar
> + eval last=${1
> foo: closing brace expected
Fix is included below. This should be applied to zsh-3.0.3-test4 and
zsh-3.1.1.
Zoltan
*** Src/lex.c 1997/01/05 21:07:31 3.1.1.4
--- Src/lex.c 1997/01/28 23:27:21
***************
*** 986,992 ****
cmdpop();
zerr("closing brace expected", NULL, 0);
} else if (unset(IGNOREBRACES) && !sub && len > 1 &&
! peek == STRING && bptr[-1] == '}') {
/* hack to get {foo} command syntax work */
bptr--;
len--;
--- 986,992 ----
cmdpop();
zerr("closing brace expected", NULL, 0);
} else if (unset(IGNOREBRACES) && !sub && len > 1 &&
! peek == STRING && bptr[-1] == '}' && bptr[-2] != Bnull) {
/* hack to get {foo} command syntax work */
bptr--;
len--;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author