# HG changeset patch # User Jeff Hammel # Date 1523469313 25200 # Node ID ebfcbbc8a627b973881300c061ec3caad8a867d9 # Parent 977b5789cfe88f750eecaf9a42dc9dd8ba13ca0b only run deactivate iff a function diff -r 977b5789cfe8 -r ebfcbbc8a627 .bashrc --- a/.bashrc Fri Dec 22 14:11:19 2017 -0800 +++ b/.bashrc Wed Apr 11 10:55:13 2018 -0700 @@ -609,7 +609,14 @@ ### deactivate any virtualenvs if type deactivate &> /dev/null then -deactivate + DEACTIVATE_TYPE=$(type -t deactivate) + if [[ ${DEACTIVATE_TYPE} == "function" ]] + then + deactivate + elif [[ ${DEACTIVATE_TYPE} == "file" ]] + then + . deactivate + fi fi