X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/69186ec25e94e812e29fb6460797b79ace5ebd7c..43026cf3f96eb213656fc373ba50080d3abe55c0:/dot/bash_profile diff --git a/dot/bash_profile b/dot/bash_profile index 27eec06..b6c09bf 100644 --- a/dot/bash_profile +++ b/dot/bash_profile @@ -2,9 +2,8 @@ ### ### Bash startup things -## Only do any of this if we haven't done it before. Otherwise we -## can have loops and lots of wasted time. -if [ -z "$__mdw_profile" ]; then +## The `.bashrc' hook will run us if it thinks we haven't been run before. +## We should therefore let it know. export __mdw_profile=done ###-------------------------------------------------------------------------- @@ -57,7 +56,7 @@ __mdw_programp () { type -t >/dev/null "$1"; } ## changes directory and displays the name of the directory in a subshell to ## avoid changing the current state. HOME=`(set -P; cd $HOME; pwd)` -cd $HOME +[ -n "$SCHROOT_SESSION_ID" ] || cd $HOME ## CDE's session structure is demented and doesn't leave us with a proper ## logout hook, so synthesize one here. @@ -150,7 +149,7 @@ export LC_COLLATE=POSIX LANG ## Pager configuration. export MDW_PAGER=`type -p less` PAGER=mdw-pager METAMAIL_PAGER=mdw-pager -export LESS="-iqgRh1FSX" +export LESS="-iqgRh1j.3FSX" export LESSOPEN="|lesspipe.sh %s" case "${LC_CTYPE-$LANG}" in *utf8 | *utf-8 | *UTF8 | *UTF-8) LESSCHARSET=utf-8 ;; @@ -186,7 +185,7 @@ __mdw_programp distcc && export CCACHE_PREFIX=distcc ## graphical one. browsers="elinks w3m lynx" case "${DISPLAY+t}" in - t) browsers="mdw-chrome iceweasel firefox $browsers" ;; + t) browsers="mdw-iceweasel mdw-chrome iceweasel firefox $browsers" ;; esac for i in $browsers; do if __mdw_programp $i; then @@ -286,9 +285,6 @@ fi ## If there's a local hook then run it. [ -f "$HOME/.profile-local" ] && . "$HOME/.profile-local" -## End of the `__mdw_profile' guard. -fi - ## If we haven't run the `.bashrc' yet, and this shell is interactive, then ## run it now. [ -z "$__mdw_bashrc" ] && [ -t 0 ] && \