[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: param expansion with single-character special vars in the environmen
From: |
Chet Ramey |
Subject: |
Re: param expansion with single-character special vars in the environment |
Date: |
Mon, 2 May 2016 11:55:03 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 4/27/16 8:41 AM, Grisha Levit wrote:
> On Wed, Apr 27, 2016 at 7:37 AM, Piotr Grzybowski <narsil.pl@gmail.com
> <mailto:narsil.pl@gmail.com>> wrote:
>
> It seems to me that creating the reference should be allowed, but the
> access to the referenced variable should honor its attributes.
>
> Once you convert the variable to a reference, you can control its value by
> modifying the value of a different variable with the name that corresponds
> to the value of the readonly variable, so “access to the referenced
> variable should honor its attributes” probably won’t do much (If I
> understand your suggestion correctly).
I agree; `declare' should not allow attempts to add the nameref attribute
to an existing readonly variable. I will make this change before bash-4.4
is released.
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/