]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Use one logout file which is included by bash and zsh.
authorSimon Ruderich <simon@ruderich.org>
Sun, 22 Feb 2009 02:39:21 +0000 (03:39 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sun, 22 Feb 2009 02:39:21 +0000 (03:39 +0100)
Add missing bash logout file to setup.sh and add Vim modeline.

bash/logout
setup.sh
shell/logout [new file with mode: 0644]
zsh/logout

index 91f49643118dc0c646116a6e043bb7bca73e2735..af130c6adbe09e1c97db1b4133b88ea883d67a7a 100644 (file)
@@ -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
index d7764223e237f32f6c72b6d9cbee97d3465fd51b..be74639a0ba2eaecbb2ee7dd71394e39d35a32ed 100755 (executable)
--- 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 (file)
index 0000000..069603d
--- /dev/null
@@ -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
index e8bb4f1949a6cb2f892bc930b6221c8064ebdd01..8564cdb8c05d3272760a7caebd98a198fb81a830 100644 (file)
@@ -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