[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unexpected behavior of 'declare +n var' when var's target is unset a
From: |
Chet Ramey |
Subject: |
Re: Unexpected behavior of 'declare +n var' when var's target is unset and undeclared |
Date: |
Fri, 9 Mar 2018 15:47:42 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 3/8/18 2:51 PM, GreatBigDot wrote:
> Bash Version: 4.4
> Patch Level: 19
> Release Status: release
>
> Description:
> If you try to turn a nameref back a regular variable with
> 'declare -n' but the nameref is pointing to an undeclared variable, the
> nameref remains a nameref, and the variable it points to is declared
> (but remians unset).
Thanks for the report. This is a bug: the code neglected to remove the
nameref attribute from `foo' before tying to modify the attributes of the
referenced variable (`bar'). It will be fixed in the next devel snapshot.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/