commit bash-20110608 snapshot

This commit is contained in:
Chet Ramey
2011-12-29 13:09:08 -05:00
parent 276cb932b6
commit 7fc96f7961
5 changed files with 41 additions and 1 deletions
+1
View File
@@ -772,6 +772,7 @@ tests/array7.sub f
tests/array8.sub f
tests/array9.sub f
tests/array10.sub f
tests/array11.sub f
tests/array-at-star f
tests/array2.right f
tests/assoc.tests f
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/bash/bash-current
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+8
View File
@@ -341,3 +341,11 @@ ednesday
onday
uesday
ednesday
version[agent]
version.agent
version[agent]
version.agent
version[agent] foo[bar]
version.agent bowl
foobar] foo foo[bar]
bleh bbb bleh
+2
View File
@@ -388,3 +388,5 @@ ${THIS_SH} ./array8.sub
${THIS_SH} ./array9.sub
${THIS_SH} ./array10.sub
${THIS_SH} ./array11.sub
+29
View File
@@ -0,0 +1,29 @@
# problems with associative array keys with ] and unbalanced [ ]
# fixed after bash-4.2
declare -A foo
foo=(["version[agent]"]=version.agent)
echo ${!foo[@]}
echo ${foo[@]}
unset foo
declare -A foo
foo["version[agent]"]=version.agent
echo ${!foo[@]}
echo ${foo[@]}
declare foo["foo[bar]"]=bowl
echo ${!foo[@]}
echo ${foo[@]}
declare -A array2["foo[bar]"]=bleh
array2["foobar]"]=bleh
array2["foo"]=bbb
echo ${!array2[@]}
echo ${array2[@]}