From: Oleg Broytman Date: Mon, 24 Jul 2017 16:05:38 +0000 (+0300) Subject: .shellrc: activate virtualenv in a subshell X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=2fe998af793914f5c014bb7e732e7ed1b47c678a;p=dotfiles.git .shellrc: activate virtualenv in a subshell --- diff --git a/.shellrc b/.shellrc index f62347b..1b15d83 100644 --- a/.shellrc +++ b/.shellrc @@ -160,9 +160,9 @@ if test -n "$BASH_VERSION"; then source virtualenvwrapper_lazy.sh 2>/dev/null - #if [ -n "$VIRTUAL_ENV" ]; then - # . "$VIRTUAL_ENV/bin/activate" - #fi + if [ -n "$VIRTUAL_ENV" ] && ! type deactivate >/dev/null 2>&1; then + . "$VIRTUAL_ENV/bin/activate" + fi elif test -n "$KSH_VERSION" -o -n "$FCEDIT"; then back() { cd - "$@"; }