From d6dcca45539b99442cec16a42c6b7df10536a6f5 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Sun, 25 Sep 2022 12:29:39 -0500 Subject: [PATCH] Autoload single session --- zshmux.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/zshmux.zsh b/zshmux.zsh index 55adbe0..e87c974 100644 --- a/zshmux.zsh +++ b/zshmux.zsh @@ -6,6 +6,7 @@ if [[ -z $TMUX ]]; then if [[ $(tmux list-sessions -F"#{?session_attached,,x}" | grep "x" | wc -l) -eq 1 ]]; then tmux attach-session -t $(tmux list-sessions -F"#S") + return else printf '\033[32;1mCurrent \033[33;1mtmux \033[32;1msessions\033[0m:\n' tmux list-sessions -F"#S - (#{?session_attached,Attached,Not Attached})" -- 2.45.2