aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-20 02:52:49 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-20 02:52:49 +1200
commitc99b0ebaa22e6532b6d8a0b09a99db51855a8190 (patch)
tree86c7b3873456f55eb25177d556003f15f8f61b82 /sh
parentAdd sshi(1) (diff)
downloaddotfiles-c99b0ebaa22e6532b6d8a0b09a99db51855a8190.tar.gz
dotfiles-c99b0ebaa22e6532b6d8a0b09a99db51855a8190.zip
Remove OLDPWD hack
It doesn't really make sense anyway
Diffstat (limited to 'sh')
-rw-r--r--sh/logout2
-rw-r--r--sh/profile22
2 files changed, 0 insertions, 24 deletions
diff --git a/sh/logout b/sh/logout
deleted file mode 100644
index 4da61192..00000000
--- a/sh/logout
+++ /dev/null
@@ -1,2 +0,0 @@
-# Write PWD to a file if set
-printf '%s\n' "$PWD" >"${OLDPWD_FILE:-"$HOME"/.oldpwd}"
diff --git a/sh/profile b/sh/profile
index b2889295..5dfe0ef3 100644
--- a/sh/profile
+++ b/sh/profile
@@ -3,28 +3,6 @@ if [ -d "$HOME"/.local/bin ] ; then
PATH=$HOME/.local/bin:$PATH
fi
-# If we can read ~/.oldpwd, make its contents our OLDPWD
-if [ -r "$HOME"/.oldpwd ] ; then
- IFS= read -r OLDPWD < "$HOME"/.oldpwd
- export OLDPWD
-fi
-
-# Trap on exit to run ~/.logout if it exists
-logout_trap() {
- if [ -f "$HOME"/.logout ] ; then
- . "$HOME"/.logout
- fi
- if [ "$1" != EXIT ] ; then
- trap - "$1"
- kill "-$1" "$$"
- fi
-}
-for sig in EXIT HUP INT TERM ; do
- # shellcheck disable=SC2064
- trap "logout_trap $sig" "$sig"
-done
-unset -v sig
-
# Load all supplementary scripts in ~/.profile.d
for sh in "$HOME"/.profile.d/*.sh ; do
[ -e "$sh" ] && . "$sh"