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

Re: PATCH: Re: Parameter expansion/substitution rules



Peter Stephenson wrote:

> I've also mentioned double subscripting of arrays, e.g. $path[1][2].

Your example in the manual is correct, but maybe we should mention
explicitly that multiple subscripts are supported only if the whole
thing is in braces.

Also, this doesn't work only for arrays. One can apply as many
subscripts as one wishes to whatever one wishes. Maybe we should add
an example for something like `select the last element matching a* in
the first four elements of array foo', which would be `${foo[1,4][(R)a*]}'.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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