aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_logout
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-04-29 16:09:04 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-04-29 16:09:04 +1200
commit5f1c44d1b74edf836bb489bb96a409c9aeb402ad (patch)
treeddd27f648134a5785a8bcd566e6f6383a373b11e /bash/bash_logout
parentWhoops, didn't mean to delete it (diff)
downloaddotfiles-5f1c44d1b74edf836bb489bb96a409c9aeb402ad.tar.gz
dotfiles-5f1c44d1b74edf836bb489bb96a409c9aeb402ad.zip
Keep OLDPWD between logins
Diffstat (limited to 'bash/bash_logout')
-rw-r--r--bash/bash_logout3
1 files changed, 3 insertions, 0 deletions
diff --git a/bash/bash_logout b/bash/bash_logout
index 29264c78..6f539b04 100644
--- a/bash/bash_logout
+++ b/bash/bash_logout
@@ -8,3 +8,6 @@ if ((SHLVL == 1)) ; then
clear_console -q 2>/dev/null
fi
+# Write PWD to a file if set
+printf '%s\n' "$PWD" > "${OLDPWD_FILE:-$HOME/.oldpwd}"
+