Ah so `arr+=([a]=x [b]=y)` will no longer be the same as `arr+=([a]+=x [b]+=y)`? I never liked that for associative arrays because the only workaround was to do multiple arr[key]= assignments to update or add more than one element at a time.
My thinking was that this is due to bash's unique auto-incrementing of indexed array keys. Since in ksh you're not allowed to specify an index for one element of a compound assignment without specifying it for all elements, bash has some additional things to consider. ~ $ bash-4.2 -c 'typeset -ia a=({0..5}); a+=([0]+=1 {2..4}); typeset -p a' declare -ai a='([0]="1" [1]="3" [2]="5" [3]="7" [4]="4" [5]="5")' Bash 4.4: ~ $ ./doc/programs/bash-build/bash -c 'typeset -ia a=({0..5}); a+=([0]+=1 {2..4}); typeset -p a' declare -ai a=([0]="1" [1]="2" [2]="3" [3]="4" [4]="4" [5]="5") I almost think it makes sense to treat ordered and unordered collections differently. With an unordered collection an outer += should obviously mean "add or update for each assignment". For an ordered collection when appending beginning at an index lower than the max index I'm not so sure. -- Dan Douglas