diff options
Diffstat (limited to 'sh')
-rw-r--r-- | sh/logout | 2 | ||||
-rw-r--r-- | sh/profile | 22 |
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}" @@ -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" |