aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rw-r--r--sh/profile.d/oldpwd.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/sh/profile.d/oldpwd.sh b/sh/profile.d/oldpwd.sh
new file mode 100644
index 00000000..96786338
--- /dev/null
+++ b/sh/profile.d/oldpwd.sh
@@ -0,0 +1,6 @@
+# If we can read ~/.oldpwd, make its contents our OLDPWD
+if [ -r "${OLDPWD_FILE:-$HOME/.oldpwd}" ] ; then
+ read -r OLDPWD < "${OLDPWD_FILE:-$HOME/.oldpwd}"
+ export OLDPWD
+fi
+