tmux script corrected
This commit is contained in:
parent
571bbdfcbe
commit
bf1c7d7683
6
tmux_ssh
6
tmux_ssh
@ -1,9 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
SESSION=$(tmux display-message -p '#S' 2> /dev/null)
|
SESSION=$(tmux ls -F "#{session_name}")
|
||||||
|
|
||||||
|
echo $NEW
|
||||||
|
|
||||||
if [ "$SESSION" = "" ]; then
|
if [ "$SESSION" = "" ]; then
|
||||||
tmux attach-session -t default_ssh || tmux new-session -s default_ssh
|
tmux attach-session -t default_ssh || tmux new-session -s default_ssh
|
||||||
|
else
|
||||||
|
echo tmux-session \"$SESSION\" already running.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user