On 3/29/21 5:18 PM, Chet Ramey wrote:
If you look at

a=( k1 v1 k2 v2 k3 v3)

as more or less syntactic sugar for

a=( [k1]=v1 [k2]=v2 [k3]=v3 )

it's reasonable that

a=( k1 v1 k2 )

is equivalent to

a=( [k1]=v1 [k2]= ). And that's what bash does.



Its just when populating that array dynamically with another array
if that second array didn't contain `v1' hypothetically, the array gets shifted 
to

a=( [k1]=k2 [v2]=k3 [v3]= )
which i would imagine to be unexpected for the author of the code and would 
rather
it error out instead of chugging along.

Reply via email to