From 7cd2e717047fc325da34b75ac73a436e5b76004a Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Sat, 6 Apr 2024 15:55:24 -0700 Subject: [PATCH] fixed: zshmux failing if only one session --- include/zshmux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zshmux.sh b/include/zshmux.sh index b8041a0..4fe2bbe 100644 --- a/include/zshmux.sh +++ b/include/zshmux.sh @@ -9,7 +9,7 @@ # check if any sessions exit if [[ $(tmux list-sessions | wc -l) -ne 0 ]]; then if [[ $(tmux list-sessions -F"#{?session_attached,,x}" | grep -c "x" ) -eq 1 ]] && [[ -z $SSH_CLIENT ]]; then - tmux attach-session -t "$(tmux list-sessions -F"#{?session_attached,,#S}" )" + tmux attach-session -t "$(tmux list-sessions -F"#{?session_attached,,#S}" | xargs echo )" return else printf '\033[32;1mcurrent \033[33;1mtmux \033[32;1msessions\033[0m:\n' -- 2.45.2