replace tr by shell's IFS

This commit is contained in:
Yamashita Yuu 2012-09-07 20:10:10 +09:00
parent e89ae3a4a9
commit 4174749b24

View file

@ -3,8 +3,7 @@ set -e
[ -n "$PYENV_DEBUG" ] && set -x [ -n "$PYENV_DEBUG" ] && set -x
if [ -n "$PYENV_VERSION" ]; then if [ -n "$PYENV_VERSION" ]; then
# IFS=: versions=($(${PYENV_VERSION})) # this does not work on zsh without `setopt shwordsplit`. IFS=: versions=($(echo "${PYENV_VERSION}"))
versions=($(echo "${PYENV_VERSION}" | tr ":" " "))
else else
PYENV_VERSION_FILE="$(pyenv-version-file)" PYENV_VERSION_FILE="$(pyenv-version-file)"
IFS=: versions=($(pyenv-version-file-read "$PYENV_VERSION_FILE" || true)) IFS=: versions=($(pyenv-version-file-read "$PYENV_VERSION_FILE" || true))