Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Identifier bug
- X-seq: zsh-workers 4845
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Identifier bug
- Date: Fri, 18 Dec 1998 11:59:03 +0100 (MET)
- In-reply-to: Peter Stephenson's message of Fri, 18 Dec 1998 11:24:50 +0100
Peter Stephenson wrote:
>
> I was just about to put together another development version when I
> discovered this.
>
> % foo=(a b)
> % foo[1]=c
> zsh: not an identifier: foo[1]
Ok, now I dare to propose this one.
But note that this still has problems if the string inside the `[...]'
contains unmatched opening or closing brackets.
Bye
Sven
*** os/params.c Thu Dec 17 15:06:20 1998
--- Src/params.c Fri Dec 18 11:56:53 1998
***************
*** 661,669 ****
return 0;
/* Require balanced [ ] pairs */
! for (s = ss; *(s += strcspn(++ss, "[]")) && s > ss; ss = s)
! ;
! return (*ss == ']' && !ss[1]);
#endif
}
--- 661,669 ----
return 0;
/* Require balanced [ ] pairs */
! if (skipparens('[', ']', &ss))
! return 0;
! return !*ss;
#endif
}
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author