mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-25 00:21:58 +00:00
set P9K_PYENV_PYTHON_VERSION correctly when dealing with multiple pyenv versions (#1376)
This commit is contained in:
parent
0ab7e1ccfd
commit
4d2346da0a
1 changed files with 9 additions and 5 deletions
|
@ -4216,11 +4216,15 @@ function _p9k_pyenv_compute() {
|
|||
|
||||
local versions=${PYENV_ROOT:-$HOME/.pyenv}/versions
|
||||
versions=${versions:A}
|
||||
local version=$versions/$v
|
||||
version=${version:A}
|
||||
if [[ $version == (#b)$versions/([^/]##)* ]]; then
|
||||
typeset -g P9K_PYENV_PYTHON_VERSION=$match[1]
|
||||
fi
|
||||
local name version
|
||||
for name in ${(s.:.)v}; do
|
||||
version=$versions/$name
|
||||
version=${version:A}
|
||||
if [[ $version(#qN/) == (#b)$versions/([^/]##)* ]]; then
|
||||
typeset -g P9K_PYENV_PYTHON_VERSION=$match[1]
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
typeset -g _p9k__pyenv_version=$v
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue