From 97f8a1818926af6a2ba55d64b6631194a0cba129 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 29 Jul 2016 18:31:19 +0300 Subject: [PATCH] .bash_logout: clean up python virtual environment on exit --- .bash_logout | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.2