Use exec to replace current shell with tmux instead of forking

This commit is contained in:
Marko Korhonen 2022-09-03 12:24:59 +03:00
parent 7fe8f0b9e2
commit 44d1ccc82d
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890

View file

@ -1,6 +1,6 @@
# Launch tmux if logging in over ssh
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
exec tmux attach-session -t ssh_tmux || exec tmux new-session -s ssh_tmux
fi
# share history between running zsh instances