Browse Source

tmux script corrected

84582af
Dirk Alders 2 years ago
parent
commit
bf1c7d7683
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      tmux_ssh

+ 5
- 1
tmux_ssh View File

1
 #!/bin/sh
1
 #!/bin/sh
2
 #
2
 #
3
-SESSION=$(tmux display-message -p '#S' 2> /dev/null)
3
+SESSION=$(tmux ls -F "#{session_name}")
4
+
5
+echo $NEW
4
 
6
 
5
 if [ "$SESSION" = "" ]; then
7
 if [ "$SESSION" = "" ]; then
6
 	tmux attach-session -t default_ssh || tmux new-session -s default_ssh
8
 	tmux attach-session -t default_ssh || tmux new-session -s default_ssh
9
+else
10
+	echo tmux-session \"$SESSION\" already running.
7
 fi
11
 fi
8
 
12
 
9
 
13
 

Loading…
Cancel
Save