]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Automatically use a screen session or start a new one when using zsh locally.
authorSimon Ruderich <simon@ruderich.org>
Wed, 1 Oct 2008 13:17:13 +0000 (15:17 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 16 Feb 2009 15:34:39 +0000 (16:34 +0100)
zsh/rc.local

index b45f7f5fdeab4706d1b3587c7cd1d93db0026fdd..43c63ba93b41a22a26926b7486865084f156f033 100644 (file)
@@ -19,3 +19,11 @@ alias cdp='cd ~page'
 MAIL=/var/mail/$USER
 # Check for new mails every sixty seconds.
 MAILCHECK=60
+
+# Automatically reattach to an open screen session or start a new one.
+if [[ $TERM != 'screen' && $TERM != 'dumb' ]]; then
+    screen -RR
+    # Print current screen information after exiting screen.
+    clear
+    screen -list
+fi