On 2/18/15 2:30 PM, SN wrote:

> Thanks for checking it on various versions! In 4.4.0(1)-devel this test
> passes for a few variations I tried. For example:
> 
> $ f() { declare -a a="()"; eval "declare -p a"; printf "[%s]\n"
> "${a[@]}"; }; f
> declare -a a=([0]="()")
> [()]
> 
> and
> 
> $ f() { declare -a a=(); eval "declare -p a"; printf "[%s]\n" "${a[@]}";
> }; f
> declare -a a=()
> []
> 
> so it's good.

That's one of the changes to bash-4.4 that isn't backwards compatible.
Right now, you have to set the shell compatibility level to get bash-4.3
behavior; I'm considering changing bash-4.4 to have compatible behavior
when using quoted compound array assignment, but with a warning about
the syntax being deprecated.  What do folks on the list think?

Chet

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

Reply via email to