[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: declare a="$b" if $a previously set as array
From: |
Chet Ramey |
Subject: |
Re: declare a="$b" if $a previously set as array |
Date: |
Mon, 22 Dec 2014 13:23:00 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 12/17/14 3:58 AM, konsolebox wrote:
> On Mon, Dec 15, 2014 at 4:34 AM, Chet Ramey <chet.ramey@case.edu> wrote:
>> It does implement `emulated behavior of normal assignments'. The question
>> is whether or not it should do that after having had its arguments undergo
>> one round of word expansion.
>
> After studying the code I realized that that's actually the only thing
> we have to consider for changing. It turns out that the solution here
> is to just not allow expanded arguments to have compound assignments.
> This may break a little compatibility but I believe it's the only
> proper solution for it.
Yes, if we decide to go that way, this is the place to change it. There
are a few more things to do if we want to do more to unify the way that
arguments to declare and assignment statements are handled.
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/
Re: declare a="$b" if $a previously set as array, Chet Ramey, 2014/12/14
Re: declare a="$b" if $a previously set as array, Dan Douglas, 2014/12/15