fix(pyenv): load managed Python in every zsh

The pyenv fragment lived in the interactive overlay, so agents and zsh -c fell back to system Python. Install it through the always-on fragment path and keep XDG destinations aligned with the loader.
This commit is contained in:
Frank Qing
2026-08-07 18:14:22 +08:00
parent bff5ceddf0
commit 9257eceb47
6 changed files with 31 additions and 15 deletions
+7
View File
@@ -0,0 +1,7 @@
# pyenv (Python Version Manager), always-on via ~/.zshenv
export PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}"
[[ -d "$PYENV_ROOT/bin" ]] && export PATH="$PYENV_ROOT/bin:$PATH"
[[ -d "$PYENV_ROOT/shims" ]] && export PATH="$PYENV_ROOT/shims:$PATH"
if [[ -o interactive ]] && command -v pyenv &> /dev/null; then
eval "$(pyenv init - zsh)"
fi