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

Re: nested parameter expansion



On Thu, Sep 24, 2020 at 10:15 AM Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
>
> You could add some eval trickery, but I suspect it's not worth making it any
> more complicated.

This should work:

    print ${(P)${:-P${ndx}_ARRAY}}

I wouldn't recommend writing it this way. It's quite a bit more
cryptic than using an intermediate variable.

Roman.




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