On 4/27/16 8:41 AM, Grisha Levit wrote:
> On Wed, Apr 27, 2016 at 7:37 AM, Piotr Grzybowski <[email protected]
> <mailto:[email protected]>> 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 [email protected] http://cnswww.cns.cwru.edu/~chet/