# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# change behavior of shell builtins to extend assoc_expand_once to indexed
# arrays
export subscript='$(echo INJECTION! >&2 ; echo 0)'
shopt -s array_expand_once
printf -v a["$subscript"] %s hi
declare -p a
unset a
printf -v "a[$subscript]" %s hi
declare -p a
a[0]=hi
unset a["$subscript"]
declare -p a
unset a
unset a["$subscript"]
declare -p a
unset -v a
read a["$subscript"] <<