bug-bash
[Top][All Lists]
Advanced

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

Re: Assignment of associative arrays through braces


From: Chet Ramey
Subject: Re: Assignment of associative arrays through braces
Date: Tue, 31 Jul 2018 10:31:25 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 7/27/18 7:13 PM, konsolebox wrote:
> Hi Chet,
> 
> I wonder if you can allow bash to have another syntax to allow simpler
> declaration and/or definition of associative arrays.  The changes
> needed to have it done seem simple enough, and the only conflict it
> makes is a scalar `var={...` assignment, which in my opinion is better
> quoted to make it more readable and less questionable from other
> syntaxes like brace expansion.  I believe most people intuitively
> quotes it, and assignments that start with `{` is fairly rare.

So it's syntactic sugar for `declare -gA a; a=( ... )'?

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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