bug-bash
[Top][All Lists]
Advanced

[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 14:30:25 -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:36 PM, Grisha Levit wrote:
> 
> On Wed, Apr 27, 2016 at 6:47 PM, Piotr Grzybowski <narsil.pl@gmail.com
> <mailto:narsil.pl@gmail.com>> wrote:
> 
>     +             if (v == 0 && onref || ( onref && !legal_identifier(value)))
> 
> 
> Shouldn't this (and the other patch) check valid_array_reference as well to
> support declare -n ref=a[x] ?

I ended up writing a new function: valid_nameref_value(name, flags) which
I can customize to serve this purpose.

-- 
``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/



reply via email to

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