diff --git a/modules/prompt/external/powerlevel10k b/modules/prompt/external/powerlevel10k index f5d6184..8a676a9 160000 --- a/modules/prompt/external/powerlevel10k +++ b/modules/prompt/external/powerlevel10k @@ -1 +1 @@ -Subproject commit f5d61840ae3a4f8c2765e1a67d94d9a96de71601 +Subproject commit 8a676a9157d2b0e00e88d06456ac7317f11c0317 diff --git a/modules/prompt/external/pure b/modules/prompt/external/pure index 2e354b8..5b458ba 160000 --- a/modules/prompt/external/pure +++ b/modules/prompt/external/pure @@ -1 +1 @@ -Subproject commit 2e354b80deae105ea246699c49e65dcd4fe8b759 +Subproject commit 5b458ba5b75f49a8071d53c343f1a23631f7bced diff --git a/modules/python/init.zsh b/modules/python/init.zsh index 91aa6d0..22b61c3 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -114,33 +114,34 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \ pyenv_plugins=(${(@oM)${(f)"$(pyenv commands --no-sh 2> /dev/null)"}:#virtualenv*}) fi + # Optionally activate 'virtualenv' plugin when available. if (( $pyenv_plugins[(i)virtualenv-init] <= $#pyenv_plugins )); then - # Enable 'virtualenv' with 'pyenv'. eval "$(pyenv virtualenv-init - zsh)" - - # Optionally activate 'virtualenvwrapper' plugin when available. - if (( $pyenv_plugins[(i)virtualenvwrapper(_lazy|)] <= $#pyenv_plugins )); then - pyenv "$pyenv_plugins[(R)virtualenvwrapper(_lazy|)]" - fi - else - # Fallback to 'virtualenvwrapper' without 'pyenv' wrapper if 'python' is - # available in '$path'. - if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then - VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#] - fi - - virtenv_sources=( - ${(@Ov)commands[(I)virtualenvwrapper(_lazy|).sh]} - /usr/share/virtualenvwrapper/virtualenvwrapper(_lazy|).sh(OnN) - ) - if (( $#virtenv_sources )); then - source "$virtenv_sources[1]" - fi - - unset virtenv_sources fi + # Optionally activate 'virtualenvwrapper' plugin when available. + if (( $pyenv_plugins[(i)virtualenvwrapper(_lazy|)] <= $#pyenv_plugins )); then + pyenv "$pyenv_plugins[(R)virtualenvwrapper(_lazy|)]" + fi + unset pyenv_plugins + +else + # Fallback to 'virtualenvwrapper' without 'pyenv' wrapper if 'python' is + # available in '$path'. + if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then + VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#] + fi + + virtenv_sources=( + ${(@Ov)commands[(I)virtualenvwrapper(_lazy|).sh]} + /usr/share/virtualenvwrapper/virtualenvwrapper(_lazy|).sh(OnN) + ) + if (( $#virtenv_sources )); then + source "$virtenv_sources[1]" + fi + + unset virtenv_sources fi # Load conda into the shell session, if requested.