Use more idiomatic check for commands

This commit is contained in:
Marc Cornellà 2018-04-22 19:53:34 +02:00 committed by GitHub
commit 6e5244d158
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,9 @@
# This plugin loads pyenv into the current shell and provides prompt info via
# the 'pyenv_prompt_info' function. Also loads pyenv-virtualenv if available.
if which pyenv > /dev/null; then
if (( $+commands[pyenv] )); then
eval "$(pyenv init - zsh)"
if which pyenv-virtualenv-init > /dev/null; then
if (( $+commands[pyenv-virtualenv-init] )); then
eval "$(pyenv virtualenv-init - zsh)"
fi
function pyenv_prompt_info() {