feat(virtualenvwrapper): disable lazy script and force full script with environment variable

This commit is contained in:
JM Rohwer 2021-08-16 14:47:21 +02:00
parent 11e22ed0b5
commit 2babe619a3

View file

@ -9,9 +9,13 @@ function {
$HOME/.local/bin/virtualenvwrapper.sh $HOME/.local/bin/virtualenvwrapper.sh
do do
if [[ -f "$virtualenvwrapper" ]]; then if [[ -f "$virtualenvwrapper" ]]; then
if [[ $VIRTUALENVWRAPPER_NO_LAZY -eq 1 ]] && [[ $(echo $virtualenvwrapper | grep lazy) ]]; then
true
else
source "$virtualenvwrapper" source "$virtualenvwrapper"
return return
fi fi
fi
done done
print "[oh-my-zsh] virtualenvwrapper plugin: Cannot find virtualenvwrapper.sh.\n"\ print "[oh-my-zsh] virtualenvwrapper plugin: Cannot find virtualenvwrapper.sh.\n"\
"Please install with \`pip install virtualenvwrapper\`" >&2 "Please install with \`pip install virtualenvwrapper\`" >&2