X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.bash_logout;h=ccd81db926157aba9e1c23cb742583fb633a393c;hb=ad1fd6dcf5ea7e44ddb3f1e912ffbfc6aa47581b;hp=de4f5f75d7ccd3a5b62bd2ce683ed678a5cb72c2;hpb=57d4f65880c405ebf87c56594c1e86bb6e4c1841;p=dotfiles.git diff --git a/.bash_logout b/.bash_logout index de4f5f7..ccd81db 100644 --- a/.bash_logout +++ b/.bash_logout @@ -1,7 +1,12 @@ # ~/.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 - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q || clear fi