From: Simon Ruderich Date: Wed, 1 Oct 2008 13:17:13 +0000 (+0200) Subject: Automatically use a screen session or start a new one when using zsh locally. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=6185b1ce3424aeda444e9ba7e3af72fab25b4bd8;p=config%2Fdotfiles.git Automatically use a screen session or start a new one when using zsh locally. --- 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