]> git.huck.website - zshmux.git/commitdiff
Autoload single session
authorHuck Boles <huboles@protonmail.com>
Sun, 25 Sep 2022 17:29:39 +0000 (12:29 -0500)
committerHuck Boles <huboles@protonmail.com>
Sun, 25 Sep 2022 17:29:39 +0000 (12:29 -0500)
zshmux.zsh

index 55adbe02443208ec7b7623123cb10ad7658973a4..e87c974b12e5fff6dbe32d25215e0e95384cc9d0 100644 (file)
@@ -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})"