From: Oleg Broytman Date: Fri, 29 Jul 2016 15:31:19 +0000 (+0300) Subject: .bash_logout: clean up python virtual environment on exit X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=97f8a1818926af6a2ba55d64b6631194a0cba129;p=dotfiles.git .bash_logout: clean up python virtual environment on exit --- diff --git a/.bash_logout b/.bash_logout index de4f5f7..4c880fd 100644 --- a/.bash_logout +++ b/.bash_logout @@ -1,5 +1,10 @@ # ~/.bash_logout: executed by bash(1) when login shell exits. +# Clean up python virtual environment on exit +# See https://virtualenvwrapper.readthedocs.io/en/latest/tips.html#clean-up-environments-on-exit + +[ "$VIRTUAL_ENV" ] && deactivate + # when leaving the console clear the screen to increase privacy if [ "$SHLVL" = 1 ]; then