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

Re: easy calling of associative array?



On 11/01/2015 07:08 PM, Bart Schaefer wrote:
- ${(P)${:-${ref}[idx]}} then treats that substitution as another
   parameter expansion, and you end up where you wanted to be.
Deus avertat.  But what would prevent this from being parsed?:

${${ref}[idx]}

or even:

${${ref}[$idx]}

... since an expansion can be used in the back end just fine already.
I dunno, but the above seems at least naively straight forward.
Also, that form  works with normal arrays. But if you say it
can't work that way I can't say otherwise, of course.




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