dot_files/dot_oh-my-zsh/custom/tools/pyenv.zsh
Viktor Barzin 8db9aa926d Speed up shell startup: remove duplicate compinit, lazy-load pyenv/nvm
- Remove manual compinit in .zshrc (oh-my-zsh already handles it),
  eliminating a redundant ~350ms call
- Lazy-load pyenv init (~710ms) until first use, matching the existing
  kubectl lazy-load pattern
- Lazy-load nvm init for when it gets installed in the future
2026-02-15 18:31:04 +00:00

27 lines
730 B
Bash

# Pyenv configuration (lazy-loaded)
# Auto-loaded by oh-my-zsh from $ZSH_CUSTOM/tools/
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
if (( $+commands[pyenv] )); then
function pyenv() {
unfunction pyenv
eval "$(command pyenv init - zsh)"
pyenv "$@"
}
fi
# Virtualenvwrapper
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENV_PYTHON=python3
export WORKON_HOME=$HOME/.virtualenvs
if [[ -f /usr/local/bin/virtualenvwrapper.sh ]]; then
source /usr/local/bin/virtualenvwrapper.sh
elif [[ -f $HOME/.virtualenvwrapper.sh ]]; then
source $HOME/.virtualenvwrapper.sh
fi
# Python debugging
export PYTHONBREAKPOINT=ipdb.set_trace