From 4583d62555e805f6a97f0f431133353ea406f51d Mon Sep 17 00:00:00 2001 From: K Kollmann <git@k.kollmann.moe> Date: Sun, 14 Jan 2024 18:13:31 +0100 Subject: [PATCH] fix: PATH update for non-fish shells Checks PATH variable for existing inclusion of shims for shells other than fish. See PR #430 --- bin/pyenv-virtualenv-init | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/pyenv-virtualenv-init b/bin/pyenv-virtualenv-init index e12769a8..b977411d 100755 --- a/bin/pyenv-virtualenv-init +++ b/bin/pyenv-virtualenv-init @@ -95,8 +95,10 @@ EOS ;; * ) cat <<EOS +if [[ ":$PATH:" != *"${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims"* ]]; then export PATH="${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims:\${PATH}"; export PYENV_VIRTUALENV_INIT=1; +fi EOS ;; esac