no need optional pyenv init
This commit is contained in:
parent
192ece1f62
commit
143b1b5362
1 changed files with 22 additions and 24 deletions
|
@ -7,17 +7,16 @@
|
|||
# Patrick Bos <egpbos@gmail.com>
|
||||
#
|
||||
|
||||
if zstyle -t ':prezto:module:python:pyenv' auto-init 'yes'; then
|
||||
# Load manually installed pyenv into the shell session.
|
||||
if [[ -s "$HOME/.pyenv/bin/pyenv" ]] && (( ! $+commands[pyenv] )); then
|
||||
# Load manually installed pyenv into the shell session.
|
||||
if [[ -s "$HOME/.pyenv/bin/pyenv" ]] && (( ! $+commands[pyenv] )); then
|
||||
path=("$HOME/.pyenv/bin" $path)
|
||||
export PYENV_ROOT=$(pyenv root)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Return if requirements are not found.
|
||||
if (( ! $+commands[python] && ! $+commands[pyenv] )); then
|
||||
# Return if requirements are not found.
|
||||
if (( ! $+commands[python] && ! $+commands[pyenv] )); then
|
||||
return 1
|
||||
elif (( $+commands[python] )); then
|
||||
elif (( $+commands[python] )); then
|
||||
if (( $+commands[pyenv] )) && [[ -z "$PYENV_SHELL" ]]; then
|
||||
eval "$(pyenv init - --no-rehash zsh)"
|
||||
fi
|
||||
|
@ -33,7 +32,6 @@ if zstyle -t ':prezto:module:python:pyenv' auto-init 'yes'; then
|
|||
# This is subject to change.
|
||||
path=($HOME/.local/bin $path)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
function _python-workon-cwd {
|
||||
|
|
Loading…
Add table
Reference in a new issue