Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Identifier bug



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