bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: certain strings both legal and illegal as associative array keys


From: konsolebox
Subject: Re: certain strings both legal and illegal as associative array keys
Date: Tue, 10 Mar 2015 18:57:52 +0800

On Fri, Mar 6, 2015 at 7:14 AM, Chet Ramey <chet.ramey@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

[Prev in Thread] Current Thread [Next in Thread]