bug-bash
[Top][All Lists]
Advanced

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

Re: ${assoc[key]+set} no longer works.


From: Chet Ramey
Subject: Re: ${assoc[key]+set} no longer works.
Date: Tue, 18 Mar 2014 11:19:31 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 3/18/14 5:36 AM, geir.hauge@gmail.com 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.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

Attachment: compound-array-empty-value.patch
Description: Source code patch


reply via email to

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