Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: two new bugs
- X-seq: zsh-workers 2148
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: pws@xxxxxx (Peter Stephenson)
- Subject: Re: two new bugs
- Date: Thu, 19 Sep 1996 00:12:22 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199609180927.LAA03839@xxxxxxxxxxxx> from Peter Stephenson at "Sep 18, 96 11:27:42 am"
> Here are two recent bugs, both certainly since 3.0.0, the second very
> recent.
>
> 1)
>
> % foo[1]=bar
> zsh: command not found: foo[1]=bar
>
> (Did this come with Zoltan's patch to fix the bug that '1foo=bar'
> worked like '1=bar'? Unfortunately I've since deleted that.)
Yes, it was my patch :-(. Here is a fix for the fix. Note that 1[1]=foo
is not an assignment.
Zoltan
*** Src/lex.c 1996/09/14 03:55:08 2.45
--- Src/lex.c 1996/09/18 22:08:52
***************
*** 859,870 ****
}
} else if (!sub && peek != ENVSTRING &&
incmdpos && !bct && !brct) {
! e = 0;
! if (idigit(*tokstr))
! while (++e < len && idigit(tokstr[e]));
! else
! while (iident(tokstr[e]) && ++e < len);
! if (e == len) {
e = hgetc();
if (e == '(' && incmdpos) {
*bptr = '\0';
--- 859,875 ----
}
} else if (!sub && peek != ENVSTRING &&
incmdpos && !bct && !brct) {
! char *t = tokstr;
! if (idigit(*t))
! while (++t < bptr && idigit(*t));
! else {
! while (iident(*t) && ++t < bptr);
! if (t < bptr) {
! *bptr = '\0';
! skipparens(Inbrack, Outbrack, &t);
! }
! }
! if (t == bptr) {
e = hgetc();
if (e == '(' && incmdpos) {
*bptr = '\0';
Messages sorted by:
Reverse Date,
Date,
Thread,
Author