From: Simon Ruderich Date: Sun, 22 Feb 2009 02:39:21 +0000 (+0100) Subject: Use one logout file which is included by bash and zsh. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=a66f040ebf67a9daf18ff7e761de8e306156a783;p=config%2Fdotfiles.git Use one logout file which is included by bash and zsh. Add missing bash logout file to setup.sh and add Vim modeline. --- 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