rewrite strip of PYENV_PREFIX_PATH in a single line

This commit is contained in:
Tanix 2013-12-12 23:04:22 +09:00
parent 140808e3d4
commit fd3dd225ba

View file

@ -31,8 +31,7 @@ PYENV_PREFIX_PATHS=()
for version in "${versions[@]}"; do
if [ "$version" = "system" ]; then
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python || true)"
PYENV_PREFIX_PATH="${PYTHON_PATH%/*}"
PYENV_PREFIX_PATH="${PYENV_PREFIX_PATH%/bin}"
PYENV_PREFIX_PATH="${PYTHON_PATH%/bin/*}"
else
PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"
fi