Fix pyenv

This commit is contained in:
Alexander Rosenberg 2025-06-21 18:28:35 +09:00
parent da8cc2b511
commit c77fa00f98
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -305,6 +305,14 @@ if cmd_exists pyenv; then
export PYENV_ROOT="${HOME}/.pyenv" export PYENV_ROOT="${HOME}/.pyenv"
[[ -d "${PYENV_ROOT/bin}" ]] && export PATH="${PYENV_ROOT}/bin:${PATH}" [[ -d "${PYENV_ROOT/bin}" ]] && export PATH="${PYENV_ROOT}/bin:${PATH}"
eval "$(pyenv init - zsh)" eval "$(pyenv init - zsh)"
eval "$(pyenv virtualenv-init - zsh)"
__zsh_fix_pyenv_prompt() {
if [[ -v _OLD_VIRTUAL_PS1 ]]; then
PS1="${_OLD_VIRTUAL_PS1}"
unset _OLD_VIRTUAL_PS1
fi
}
precmd_functions+=(__zsh_fix_pyenv_prompt)
fi fi
# Bookmarks # Bookmarks