Fixing bug with array substrings

Found on tests-always-included/wick#113
This was the solution first suggested by fidian/gg-core#7
This commit is contained in:
Tyler Akins 2017-02-23 13:51:12 -06:00
parent 62478ba084
commit c2979c0fb8
No known key found for this signature in database
GPG Key ID: 8F3B8C432F4393BD

2
mo
View File

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