[Top][All Lists]

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

Re: declare [-+]n behavior on existing (chained) namerefs

From: Chet Ramey
Subject: Re: declare [-+]n behavior on existing (chained) namerefs
Date: Thu, 26 May 2016 15:03:45 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

On 4/27/16 3:26 PM, Grisha Levit wrote:
> |declare -n name=value|, when |name| is already a nameref, shows the
> following presumably inconsistent behavior:

There's a fairly compelling argument -- and I think Piotr made it -- that
`declare -n' shouldn't follow the nameref chain at all.  If it does, you
have to do something clumsy like removing the nameref attribute or
unsetting and recreating it to change the value assigned to a nameref.
ksh93 doesn't follow the chain, or does so inconsistently.


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

reply via email to

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