associative array key parsing seems to be incorrect if they contain closing square bracket inside the array=([key]=value) construct.

the following testcase :

$ declare -A key_full; key_full=(["version[agent]"]=agent.version); echo "${!key_full[@]}"
-------------------
results per version.

---- 4.0.33(1)-release (shbot in #bash) :

<shbot> Richlv: version\[agent\]

---- 4.1.7(1)-release :

-bash: declare: key_full: cannot convert indexed to associative array
0

---- 4.1.10(1)-release :

bash: declare: key_full: cannot convert indexed to associative array
0

---- 4.1.10(2)-release :

bash: [version[agent]]=agent.version: bad array subscript

----
according to people in #bash :

<sn18> i get bad array subscript with 4.2
<pgas> it fails in 4.2.8
--
 Rich

Reply via email to