plugins/virtualenv: use `_command_exists`

pull/1938/head
John D Pell 2021-09-19 10:21:55 -07:00
parent c29eb16dfc
commit ccd8b52e89
1 changed files with 5 additions and 3 deletions

View File

@ -1,12 +1,14 @@
# shellcheck shell=bash
#
# make sure virtualenvwrapper is enabled if available # make sure virtualenvwrapper is enabled if available
cite about-plugin cite about-plugin
about-plugin 'virtualenvwrapper and pyenv-virtualenvwrapper helper functions' about-plugin 'virtualenvwrapper and pyenv-virtualenvwrapper helper functions'
if _command_exists pyenv; then if _command_exists pyenv; then
pyenv virtualenvwrapper pyenv virtualenvwrapper
else elif _command_exists virtualenvwrapper.sh; then
[[ `which virtualenvwrapper.sh` ]] && . virtualenvwrapper.sh source virtualenvwrapper.sh
fi fi