From a66f040ebf67a9daf18ff7e761de8e306156a783 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 22 Feb 2009 03:39:21 +0100 Subject: [PATCH] Use one logout file which is included by bash and zsh. Add missing bash logout file to setup.sh and add Vim modeline. --- bash/logout | 15 +++++++++------ setup.sh | 1 + shell/logout | 10 ++++++++++ zsh/logout | 15 +++++++++------ 4 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 shell/logout diff --git a/bash/logout b/bash/logout index 91f4964..af130c6 100644 --- a/bash/logout +++ b/bash/logout @@ -1,8 +1,11 @@ -# Bash logout configuration file. +# Bash logout file. -# When leaving the console clear the screen to increase privacy. Taken from -# Debian default bash files. Thanks. -if [ "$SHLVL" = 1 ]; then - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q -fi +source_debug "sourcing ~/.bash/logout" + +# Load logout file usable by all shells. +source_config ~/.shell "" logout + +source_debug "finished sourcing ~/.bash/logout" + +# vim: ft=sh diff --git a/setup.sh b/setup.sh index d776422..be74639 100755 --- a/setup.sh +++ b/setup.sh @@ -11,6 +11,7 @@ link shell ~/.shell link bash ~/.bash link bash/rc ~/.bashrc link bash/profile ~/.bash_profile +link bash/logout ~/.bash_logout link zsh ~/.zsh link zsh/env ~/.zshenv link zsh/rc ~/.zshrc diff --git a/shell/logout b/shell/logout new file mode 100644 index 0000000..069603d --- /dev/null +++ b/shell/logout @@ -0,0 +1,10 @@ +# Shell logout file usable by all shells. + + +# When leaving the console clear the screen to increase privacy. Taken from +# Debian default bash files. Thanks. +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi + +# vim: ft=sh diff --git a/zsh/logout b/zsh/logout index e8bb4f1..8564cdb 100644 --- a/zsh/logout +++ b/zsh/logout @@ -1,8 +1,11 @@ -# Zsh configuration file loaded when zsh exits. +# Zsh logout file. -# When leaving the console clear the screen to increase privacy. Taken from -# Debian default bash files. Thanks. -if [ "$SHLVL" = 1 ]; then - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q -fi +source_debug "sourcing ~/.zsh/logout" + +# Load logout file usable by all shells. +source_config ~/.shell "" logout + +source_debug "finished sourcing ~/.zsh/logout" + +# vim: ft=zsh -- 2.44.1