From 2fe998af793914f5c014bb7e732e7ed1b47c678a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 24 Jul 2017 19:05:38 +0300 Subject: [PATCH] .shellrc: activate virtualenv in a subshell --- .shellrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 - "$@"; } -- 2.39.5