Files
easyzsh/zsh/pyenv.zsh
T
Frank Qing e41d2b6e93 fix(pyenv): preserve shims in login shells
macOS path_helper runs after .zshenv and can move system Python ahead of pyenv. Add an idempotent login hook and preserve it across later easyzsh migrations.
2026-08-07 18:34:50 +08:00

9 lines
379 B
Bash

# pyenv (Python Version Manager), always-on via ~/.zshenv
export PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}"
[[ -d "$PYENV_ROOT/bin" ]] && path=("$PYENV_ROOT/bin" ${path:#$PYENV_ROOT/bin})
[[ -d "$PYENV_ROOT/shims" ]] && path=("$PYENV_ROOT/shims" ${path:#$PYENV_ROOT/shims})
export PATH
if [[ -o interactive ]] && command -v pyenv &> /dev/null; then
eval "$(pyenv init - zsh)"
fi