From 4479ef76d1e67c03db9bc9ab1d2eb4a0b49a6f8f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 31 Mar 2013 14:21:20 +0200 Subject: zprofile: Only start screen if we have a terminal screen isn't being started in detached mode so it complains if there is no terminal. Signed-off-by: Florian Pritz --- .zprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.zprofile') diff --git a/.zprofile b/.zprofile index e47e9ad..7738012 100644 --- a/.zprofile +++ b/.zprofile @@ -1,4 +1,4 @@ -if [[ -z $DISPLAY ]] && type screen &>/dev/null && [[ -e ~/.screenrc-2 ]]; then +if tty -s && [[ -z $DISPLAY ]] && type screen &>/dev/null && [[ -e ~/.screenrc-2 ]]; then screenname=$(screen -list | grep "screen-sh-2") if [ ! "$screenname" ]; then exec screen -S "screen-sh-2" -c ~/.screenrc-2 -- cgit v1.2.3-24-g4f1b