X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.bashrc;h=867f11d40a3011f0e9c5e583bf74165a7151a1d4;hp=ac5325ef876ab5e60e4f6877230422e42d9e2789;hb=HEAD;hpb=cb447e101c2ba713185fcdffa96814c1649bc663 diff --git a/.bashrc b/.bashrc index ac5325e..8c05ad2 100644 --- a/.bashrc +++ b/.bashrc @@ -32,10 +32,10 @@ esac . "$HOME"/.shellrc +# This is the default value set by interactive bash +# when the global value was unset. Unset it here too. if [ "$HISTFILE" = "$HOME/.bash_history" ]; then history -r - # This is the default value set by interactive bash - # when the global value was unset. Unset it here too. unset HISTFILE fi @@ -161,11 +161,19 @@ if [ -d "$HOME/lib/config" ]; then fi complete -W "`echo $BROWSER | sed 's/:/ /g'`" start-browser -if [ "`type -t short_curdir`" != function -a \ - -r "$HOME"/admin/prog/bash_prompt ]; then - . "$HOME"/admin/prog/bash_prompt + +if [ -n "$VIRTUAL_ENV" ] && ! type deactivate >/dev/null 2>&1; then + . "$VIRTUAL_ENV/bin/activate" fi +# Clean up python virtual environment on exit +# See https://virtualenvwrapper.readthedocs.io/en/latest/tips.html#clean-up-environments-on-exit + +trap '[ "$VIRTUAL_ENV" ] && deactivate' EXIT + +. virtualenvwrapper_lazy.sh 2>/dev/null + + if test -d "$HOME"/.pyenv then PYENV_ROOT="$HOME"/.pyenv @@ -179,18 +187,6 @@ then fi -if [ -n "$VIRTUAL_ENV" ] && ! type deactivate >/dev/null 2>&1; then - . "$VIRTUAL_ENV/bin/activate" -fi - -# Clean up python virtual environment on exit -# See https://virtualenvwrapper.readthedocs.io/en/latest/tips.html#clean-up-environments-on-exit - -trap '[ "$VIRTUAL_ENV" ] && deactivate' EXIT - -. virtualenvwrapper_lazy.sh 2>/dev/null - - if test -x /usr/bin/screen >/dev/null 2>&1; then screen_newwin() { history -a