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

${a[(i)pattern]} if a=()



Hiya,

$ zsh -f -c 'a=(b); echo ${a[(i)a]}'
2
$ zsh -f -c 'a=(); echo ${a[(i)a]}'
0

Shouldn't the above return 1?

That at leasts causes compinstall to fail on

         elt=${amenu[(i)*select*]}
	 [...]
	 amenu[$elt]="select=$select"
__ci_do_selection:91: amenu: assignment to invalid subscript range

Best regards,
Stéphane



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