[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ${assoc[key]+set} no longer works.
From: |
Geir Hauge |
Subject: |
Re: ${assoc[key]+set} no longer works. |
Date: |
Wed, 19 Mar 2014 22:42:22 +0100 |
2014-03-18 16:19 GMT+01:00 Chet Ramey <address@hidden>:
> On 3/18/14 5:36 AM, address@hidden wrote:
>
> > Bash Version: 4.3
> > Patch Level: 0
> > Release Status: release
> >
> > Description:
> > With an associative array, assoc, ${assoc[key]+set} expands to the
> > empty string if the associated value is the empty string.
>
> Thanks for the report. This was a consequence of a change made back in
> 2011 to expand the value portion of the assignment statement a slightly
> different way. I've attached a patch to fix it.
Thanks. That patch also makes [[ -v assoc[x] ]] return 0. However,
[[ -v assoc ]] returns 1 (which it also does before the patch). Sounds
related to this bug.
--
Geir Hauge