bug-bash
[Top][All Lists]
Advanced

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

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


From: Piotr Grzybowski
Subject: Re: declare [-+]n behavior on existing (chained) namerefs
Date: Thu, 26 May 2016 21:40:26 +0200

On 26 May 2016, at 21:03, Chet Ramey wrote:

> 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.

 Frankly, I have no idea who made it but I do think that declare -n should not 
follow anything, and that is what I would expect when I type declare -n rea=a;
 Concerning the namerefs I would keep things as simple as they can be and above 
all else: consistent. This thread gets longer than the whole implementation, 
including patches from crazy people (like me).

 cheers,
pg




reply via email to

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