diff --git a/libexec/rbenv-exec b/libexec/rbenv-exec index eb16dc70..a9309d0e 100755 --- a/libexec/rbenv-exec +++ b/libexec/rbenv-exec @@ -33,7 +33,9 @@ export RBENV_VERSION RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")" RBENV_BIN_PATH="${RBENV_COMMAND_PATH%/*}" +OLDIFS="$IFS" IFS=$'\n' scripts=(`rbenv-hooks exec`) +IFS="$OLDIFS" for script in "${scripts[@]}"; do source "$script" done diff --git a/libexec/rbenv-rehash b/libexec/rbenv-rehash index fd987ace..b220329a 100755 --- a/libexec/rbenv-rehash +++ b/libexec/rbenv-rehash @@ -144,7 +144,10 @@ make_shims ../versions/*/bin/* cd "$OLDPWD" # Allow plugins to register shims. +OLDIFS="$IFS" IFS=$'\n' scripts=(`rbenv-hooks rehash`) +IFS="$OLDIFS" + for script in "${scripts[@]}"; do source "$script" done diff --git a/libexec/rbenv-which b/libexec/rbenv-which index 393a06e8..5d73673c 100755 --- a/libexec/rbenv-which +++ b/libexec/rbenv-which @@ -63,7 +63,9 @@ else RBENV_COMMAND_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}/bin/${RBENV_COMMAND}" fi +OLDIFS="$IFS" IFS=$'\n' scripts=(`rbenv-hooks which`) +IFS="$OLDIFS" for script in "${scripts[@]}"; do source "$script" done