From f055c5070c3cb7521d0660f578e595f9ea087e1d Mon Sep 17 00:00:00 2001 From: Preston Hunt Date: Wed, 6 Dec 2023 16:40:24 -0800 Subject: [PATCH] screen module: don't try to attach to dead screens Removes dead screens from the list of candidate screens. Fixes issue 1253, "screen:auto-start problem with dead screens". --- modules/screen/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/screen/init.zsh b/modules/screen/init.zsh index 4dea566..1a3908d 100644 --- a/modules/screen/init.zsh +++ b/modules/screen/init.zsh @@ -22,7 +22,7 @@ if [[ -z "$STY" && -z "$EMACS" && -z "$VIM" ]] && ( \ session="$( screen -list 2> /dev/null \ | sed '1d;$d' \ - | awk '{print $1}' \ + | awk '!/Dead/ {print $1}' \ | head -1)" if [[ -n "$session" ]]; then