On Nov 11, 2015 9:59 AM, "Peter Stephenson" wrote: > > This isn't obviously broken, yet. You can explore while I think about > tests. Nifty. > Hmmm... should I sanity check that the the substituted name is an > identifier, or is it a feature that > > % array=(one two three) > % word='array[2]' > % print ${${(P)word}[2]} > w > > works? I've used that trick before, though the context was with nested (P) not working. I guess I'd leave it as a feature ... essentially if the value would be legal as the left side of an assignment, it should be OK here. Check ${(P)thing::=newvalue} too ...