From c2979c0fb83432ec2e6dd2b814958f1ed7a76954 Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Thu, 23 Feb 2017 13:51:12 -0600 Subject: [PATCH] Fixing bug with array substrings Found on tests-always-included/wick#113 This was the solution first suggested by fidian/gg-core#7 --- mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mo b/mo index 9bd20d1..328616c 100755 --- a/mo +++ b/mo @@ -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")" }