From: Simon Ruderich Date: Fri, 13 Mar 2009 17:56:10 +0000 (+0100) Subject: zsh: Fix infinite loop with screen on linux console. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=4a38bc3a4780c7450a64e236344a3205506c7d46;p=config%2Fdotfiles.git zsh: Fix infinite loop with screen on linux console. This was caused because screen uses 'screen.linux' instead of 'screen' as $TERM on a linux console which wasn't checked correctly. --- diff --git a/zsh/rc b/zsh/rc index 7c59aec..0618ee4 100644 --- a/zsh/rc +++ b/zsh/rc @@ -368,7 +368,10 @@ exec 2>>(while read line; do # RUN COMMANDS # If not already in screen reattach to a running session or create a new one. -if [[ $TERM != 'screen' && $TERM != 'dumb' ]]; then +# +# screen* is necessary as `screen` uses screen.linux for example for a linux +# console which would otherwise cause an infinite loop. +if [[ $TERM != screen* && $TERM != 'dumb' ]]; then # Create a new session if none is running. if [[ $(screen -list | grep "Detached" | wc -l) == 0 ]]; then screen