diff --git a/.zshrc b/.zshrc index abc336d..87fa44c 100644 --- a/.zshrc +++ b/.zshrc @@ -68,8 +68,19 @@ export ANSIBLE_HOSTS=hosts # Enable node version manager (nvm) [[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh -# Initialize pyenv if it exists -if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi +# Enable pyenv +# See: https://github.com/yyuu/pyenv#basic-github-checkout +if [[ -d ~/.pyenv ]]; then + export PYENV_ROOT="$HOME/.pyenv" + PATH="$PYENV_ROOT/bin:$PATH" + + eval "$(pyenv init -)" + # optionally enable pyenv-virtualenv + # See: https://github.com/yyuu/pyenv-virtualenv + if [[ -d ~/.pyenv/plugins/pyenv-virtualenv ]]; then + eval "$(pyenv virtualenv-init -)" + fi +fi # Initialize jenv if it exists if which jenv > /dev/null; then