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

Re: indirect assignment to array



"Sanitizing" a varname for (P) expansion is context-dependent.  For
example, this is "legal":

varname='x[$(echo 3)]'
: ${(AP)varname::=foo}

The point being, there's no straightforward internal test that zsh
could apply to ${(P)varname} that would correctly reject "unsanitary"
references.  I suppose we could do something similar to Perl's taint
checks and prevent (P) from being used on environment variables that
have not been (re)assigned since the current shell started up.



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