]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - tests/nameref18.sub
bash-5.2 distribution sources and documentation
[thirdparty/bash.git] / tests / nameref18.sub
index a29fe379d5ae74970e33ae12eb625a37b11a17b0..7a32877f3825d3263cefeccbf05c7bbfe5216d66 100644 (file)
@@ -65,3 +65,19 @@ declare -p ref ${!ref} var
 declare +t ref
 ref=X
 declare -p ref ${!ref} var
+
+unset -n ref
+unset var
+
+arr=(1 2 3)
+
+indir='arr[@]'
+declare -n ref='arr[@]'
+
+recho "${!indir}"
+recho ${!indir}
+
+recho "$ref"
+recho $ref
+
+recho "${!indir}$ref"