From c99b0ebaa22e6532b6d8a0b09a99db51855a8190 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 20 Aug 2016 02:52:49 +1200 Subject: Remove OLDPWD hack It doesn't really make sense anyway --- sh/profile | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'sh/profile') 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" -- cgit v1.2.3