From: Huck Boles Date: Sun, 25 Sep 2022 17:29:39 +0000 (-0500) Subject: Autoload single session X-Git-Tag: v1.0~1 X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=d6dcca45539b99442cec16a42c6b7df10536a6f5;p=zshmux.git Autoload single session --- 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})"