]> git.phdru.name Git - dotfiles.git/blobdiff - .shellrc
.shellrc: activate virtualenv in a subshell
[dotfiles.git] / .shellrc
index f62347b22db131518052f1767e242e62f7851abb..1b15d83ddc834e9e9dbc94c1dab2be441c5be99f 100644 (file)
--- 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 - "$@"; }