mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-18 10:22:00 +00:00
feat(pyenv): don't load pyenv-virtualenv with ZSH_PYENV_VIRTUALENV=false
Closes #9443 Co-authored-by: Pandu POLUAN <pepoluan@gmail.com>
This commit is contained in:
parent
823be4ef5f
commit
1b03896a0e
2 changed files with 4 additions and 1 deletions
|
@ -15,6 +15,9 @@ plugins=(... pyenv)
|
|||
- `ZSH_PYENV_QUIET`: if set to `true`, the plugin will not print any messages if it
|
||||
finds that `pyenv` is not properly configured.
|
||||
|
||||
- `ZSH_PYENV_VIRTUALENV`: if set to `false`, the plugin will not load pyenv-virtualenv
|
||||
when it finds it.
|
||||
|
||||
## Functions
|
||||
|
||||
- `pyenv_prompt_info`: displays the Python version in use by pyenv; or the global Python
|
||||
|
|
|
@ -78,7 +78,7 @@ if [[ $FOUND_PYENV -eq 1 ]]; then
|
|||
eval "$(pyenv init - --no-rehash zsh)"
|
||||
|
||||
# If pyenv-virtualenv exists, load it
|
||||
if [[ -d "$PYENV_ROOT/plugins/pyenv-virtualenv" ]]; then
|
||||
if [[ -d "$PYENV_ROOT/plugins/pyenv-virtualenv" && "$ZSH_PYENV_VIRTUALENV" != false ]]; then
|
||||
eval "$(pyenv virtualenv-init - zsh)"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue