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

Re: Obscure [not UTF-8] bug in parameter expansion?



On Sep 5,  7:25pm, Bart Schaefer wrote:
} 
} [...]
} : zargs:233; s=20480 
} : zargs:234; l=ÿ 
} [...]

I've narrowed this down to a test case:

foo() { typeset -a l; echo X${${l##*}[-1]}X }

It looks like some recent change has broken negative indexing on an
empty match result (it happens with a match result on either an array
or a string, but not on a plain empty string).

This is broken in 4.2.5 and 4.2.3 as well, but not in 4.2.0.  I don't
have 4.2.1, 4.2.2 or 4.2.4 handy to test against.



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