From 4a0fa7db14ed87a20a045e05fb8ec5309f1595e3 Mon Sep 17 00:00:00 2001 From: Meutel Date: Sun, 11 Oct 2015 10:05:42 +0200 Subject: [PATCH] Evite de conserver le process du shell autour de tmux --- tmux_rattach.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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