Merge pull request #14 from tests-always-included/fix-ifs-again

Fixing bug with array substrings
This commit is contained in:
Tyler Akins 2017-02-23 14:20:36 -06:00 committed by GitHub
commit 387fc478fc

2
mo
View File

@ -343,7 +343,7 @@ moIndirectArray() {
# the array slicing to work regardless of the current IFS setting on
# bash 3. This is detailed further at
# https://github.com/fidian/gg-core/pull/7
IFS= eval "$1=(\"\${@:2}\")"
eval "$(printf "IFS= %s=(\"\${@:2}\") IFS=%q" "$1" "$IFS")"
}