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

Re: -u option does not work with recursive expansion?



On Thu, Feb 14, 2019 at 6:47 PM Dominik Vogt <dominik.vogt@xxxxxx> wrote:

>
> Well, with (P) it's possible to do recursive expansion at the
> right side of an assigntment, but can you also do soething like
>
> foo=bar
> ${foo}=baz
>
> i.e. treat the contents of foo as the lvalue of an assignment?
> (Without using eval, of course.)

% foo=bar; : ${(P)foo::=baz}; typeset -p bar
typeset bar=baz



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