X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/74a53e2864888016fbe0dfc7443801db01bd1d04..818cdbb47447afd13861314f83a454f650892256:/dot/shell-rc diff --git a/dot/shell-rc b/dot/shell-rc index 1fa4343..5c3c336 100644 --- a/dot/shell-rc +++ b/dot/shell-rc @@ -33,7 +33,7 @@ __mdw_set_prompt_pieces () { ## highlight when I'm running as some other user. Highlight when this ## isn't the outermost shell on the terminal. local left right user u tty - user=${USER-$LOGNAME} + user=${USER-${LOGNAME-$(id -un)}} case $(id -u) in 0) left=$(echo « | iconv -f UTF-8 -t //translit) @@ -324,6 +324,16 @@ pathhack () { ###-------------------------------------------------------------------------- ### Finishing touches. +## Make sure `$HOME/bin' is on the path. +path_add "$HOME/bin" + +## Set the temporary directory again. (A setuid or setgid program may have +## unhelpfully forgotten this for us.) +case ${TMPDIR+t} in + t) ;; + *) if __mdw_programp tmpdir; then eval $(tmpdir -b); fi ;; +esac + ## For `root' use -- some simple molly-guards. case $(id -u) in 0)