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

Re: PATCH: Assorted parameter stuff



On Thu, 19 Apr 2001, Sven Wischnowsky wrote:


>
>
> Anyway, about 14008: I only found one problem with a complicated
> subscript in _arguments, line 81, which can be seen by completing after
> `./configure --<TAB>'.  14016 doesn't seem to fix it either and I didn't
> look closely enough to be able to say what exactly the problem is.
>

There seems to be a problem quoting open bracket:

bor@localhost% foo=(a b c)
bor@localhost% print -r "$foo[(I)\]]"
bor@localhost% print -r "$foo[(I)[]"
zsh: invalid subscript
bor@localhost% print -r "$foo[(I)\[]"
zsh: invalid subscript
bor@localhost% print -r "$foo[(I)\\[]"
zsh: invalid subscript
bor@localhost% print -r "$foo[(I)\\\[]"
zsh: invalid subscript
bor@localhost% print -r "$foo[(I)\\\\[]"
zsh: invalid subscript

O.K. I think it already exceeds any reasonable number of backslashes :-)
This is with both patches of Bart.

4.0.1-pre-1 is even more funnier ...


bor@localhost% zsh-4.0.1-pre-1
bor@localhost% foo=(a b c)
bor@localhost% print $foo[(I)\[]
0(I)[]

so I ask myself if it ever worked

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author