diff --git a/tmux_rattach.sh b/tmux_rattach.sh index 321832a..83b48a9 100755 --- a/tmux_rattach.sh +++ b/tmux_rattach.sh @@ -2,4 +2,9 @@ # Crée ou attache une session tmux export TERM="xterm-256color" -tmux attach || tmux new +if tmux has 2> /dev/null +then + exec tmux attach +else + exec tmux new +fi