diff --git a/tmux_ssh b/tmux_ssh index 57a4c9c..23adddc 100755 --- a/tmux_ssh +++ b/tmux_ssh @@ -1,9 +1,13 @@ #!/bin/sh # -SESSION=$(tmux display-message -p '#S' 2> /dev/null) +SESSION=$(tmux ls -F "#{session_name}") + +echo $NEW if [ "$SESSION" = "" ]; then tmux attach-session -t default_ssh || tmux new-session -s default_ssh +else + echo tmux-session \"$SESSION\" already running. fi