From e7cc57acb8b1211e3781283e6893d8d55a360fd4 Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Sat, 18 Jan 2014 18:01:34 +0900 Subject: [PATCH] Preserve original IFS --- bin/pyenv-virtualenv | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/pyenv-virtualenv b/bin/pyenv-virtualenv index e820de2..ea12d25 100755 --- a/bin/pyenv-virtualenv +++ b/bin/pyenv-virtualenv @@ -309,9 +309,10 @@ after_virtualenv() { } # Load plugin hooks. -for script in $(pyenv-hooks virtualenv); do - source "$script" -done +OLDIFS="$IFS" +IFS=$'\n' scripts=(`pyenv-hooks virtualenv`) +IFS="$OLDIFS" +for script in "${scripts[@]}"; do source "$script"; done [ -d "${VIRTUALENV_PATH}" ] && PREFIX_EXISTS=1