chiark / gitweb /
dot/bashrc, dot/shell-rc: Set TMPDIR as common per-shell behaviour.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 8 Aug 2017 16:39:01 +0000 (17:39 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 8 Aug 2017 16:39:01 +0000 (17:39 +0100)
This turns out to be necessary to not have pterm forget the temporary
directory, so make it common behaviour.

dot/bashrc
dot/shell-rc

index 6d06f7eedc58f18b6c74c7e1e31e92c0a1385603..28d9bf960d72b0155e407c787883b82ea69d6a3a 100644 (file)
@@ -22,10 +22,6 @@ __mdw_source_if_exists /etc/bashrc
 ## Completion.
 __mdw_source_if_exists /etc/bash_completion "$HOME/.bash_completion"
 
-## Set the temporary directory again.  (If we've switched users, we'll want a
-## different temporary directory.)
-case ${TMPDIR+t} in t) ;; *) eval $(tmpdir -b); esac
-
 ###--------------------------------------------------------------------------
 ### Prompt hacking.
 
index 1fa43438241bb5c8cc88dbb73ef205b05011ea41..11b9fc7f8e04296eeae7ba8acf116c0db337eb3f 100644 (file)
@@ -14,6 +14,10 @@ __mdw_source_if_exists () {
   done
 }
 
+## Set the temporary directory again.  (A setuid or setgid program may have
+## unhelpfully forgotten this for us.)
+case ${TMPDIR+t} in t) ;; *) eval $(tmpdir -b); esac
+
 ###--------------------------------------------------------------------------
 ### Prompt machinery.