diff --git a/init.zsh b/init.zsh index e1ea806..0cfac17 100644 --- a/init.zsh +++ b/init.zsh @@ -305,6 +305,14 @@ if cmd_exists pyenv; then export PYENV_ROOT="${HOME}/.pyenv" [[ -d "${PYENV_ROOT/bin}" ]] && export PATH="${PYENV_ROOT}/bin:${PATH}" 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 # Bookmarks