On Fri, Mar 6, 2015 at 7:14 AM, Chet Ramey <chet.ra...@case.edu> wrote:

> At some point, I may take a look at changing this, but it would not be
> backwards compatible, and that is undesirable.  It doesn't help you
> now, either.
>
That behavior probably would be better left untouched.  We wouldn't want another
inconsistent delayed evaluation confusion like what we had on declare.  The
behavior also would already be different from other shells.

A possible problem could arise if unset tries to unset a set of words that come
from an expanded array e.g. "${NAMES[@]}" in which the expanded version
would also have expanded characters giving possibility to unset unexpected
parameters.  That would now be an added consideration.   There would be
other issues as well probably.

unset should remain a simple builtin command that processes expanded
arguments without going for another expansion.

Reply via email to