From fd3dd225ba320f27a8bf6b603856ad88c67c0e6c Mon Sep 17 00:00:00 2001 From: Tanix Date: Thu, 12 Dec 2013 23:04:22 +0900 Subject: [PATCH] rewrite strip of PYENV_PREFIX_PATH in a single line --- libexec/pyenv-prefix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libexec/pyenv-prefix b/libexec/pyenv-prefix index 882390e1..64f6f391 100755 --- a/libexec/pyenv-prefix +++ b/libexec/pyenv-prefix @@ -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