From ccd8b52e896f477576b23f03b526897b0e905272 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 19 Sep 2021 10:21:55 -0700 Subject: [PATCH] plugins/virtualenv: use `_command_exists` --- plugins/available/virtualenv.plugin.bash | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/available/virtualenv.plugin.bash b/plugins/available/virtualenv.plugin.bash index f1c85987..41d55ddf 100644 --- a/plugins/available/virtualenv.plugin.bash +++ b/plugins/available/virtualenv.plugin.bash @@ -1,12 +1,14 @@ +# shellcheck shell=bash +# # make sure virtualenvwrapper is enabled if available cite about-plugin about-plugin 'virtualenvwrapper and pyenv-virtualenvwrapper helper functions' if _command_exists pyenv; then - pyenv virtualenvwrapper -else - [[ `which virtualenvwrapper.sh` ]] && . virtualenvwrapper.sh + pyenv virtualenvwrapper +elif _command_exists virtualenvwrapper.sh; then + source virtualenvwrapper.sh fi