From bf1c7d7683c31a52a315e01eafdc5a896a671a78 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Mon, 10 Oct 2022 14:05:48 +0200 Subject: [PATCH] tmux script corrected --- tmux_ssh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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