From 6185b1ce3424aeda444e9ba7e3af72fab25b4bd8 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 1 Oct 2008 15:17:13 +0200 Subject: [PATCH] Automatically use a screen session or start a new one when using zsh locally. --- zsh/rc.local | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zsh/rc.local b/zsh/rc.local index b45f7f5..43c63ba 100644 --- a/zsh/rc.local +++ b/zsh/rc.local @@ -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 -- 2.45.2