# 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
. "$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
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
fi
-. virtualenvwrapper_lazy.sh 2>/dev/null
-
-if [ -n "$VIRTUAL_ENV" ] && ! type deactivate >/dev/null 2>&1; then
- . "$VIRTUAL_ENV/bin/activate"
+if test -x /usr/bin/screen >/dev/null 2>&1; then
+ screen_newwin() {
+ history -a
+ screen "$@"
+ }
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
-
if [ "$SHLVL" -eq 1 -a "`type -t X`" = function ] && which startx >/dev/null 2>&1; then
# From https://stackoverflow.com/a/18839557
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