X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.bashrc;h=ac5325ef876ab5e60e4f6877230422e42d9e2789;hb=932ce22686bfac2c6a457d2774ce384ff0285ee4;hp=48b9a041f0ea5018f9c89078f86845e0fcd8cae7;hpb=35854e26270711d9e3154082ac9c2d1ab2c4225c;p=dotfiles.git diff --git a/.bashrc b/.bashrc index 48b9a04..ac5325e 100644 --- a/.bashrc +++ b/.bashrc @@ -9,7 +9,11 @@ # Copied from .profile to do minor initialization for non-interactive non-login-shells umask 077 -PATH="$HOME"/bin:"$HOME"/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +# Fix default PATH +if [ "$PATH" = "/usr/local/bin:/usr/bin:/bin:/usr/games" ]; then + PATH="$HOME"/bin:"$HOME"/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +fi + if [ -n "$DISPLAY" ]; then PATH=$PATH:/usr/games fi @@ -175,8 +179,6 @@ then fi -. virtualenvwrapper_lazy.sh 2>/dev/null - if [ -n "$VIRTUAL_ENV" ] && ! type deactivate >/dev/null 2>&1; then . "$VIRTUAL_ENV/bin/activate" fi @@ -186,6 +188,16 @@ fi 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 + screen "$@" + } +fi + if [ "$SHLVL" -eq 1 -a "`type -t X`" = function ] && which startx >/dev/null 2>&1; then # From https://stackoverflow.com/a/18839557 @@ -203,10 +215,3 @@ if [ "$SHLVL" -eq 1 -a "`type -t X`" = function ] && which startx >/dev/null 2>& X() { history -a; _non_bash_X; history -r; } fi - -if test -x /usr/bin/screen >/dev/null 2>&1; then - screen_newwin() { - history -a - screen "$@" - } -fi