Add auto-tmux on ssh

This commit is contained in:
2026-03-28 10:28:03 +03:00
parent 554c4039ef
commit 14c659f616

View File

@@ -8,6 +8,11 @@ case $- in
*) return;; *) return;;
esac esac
# Auto-launch tmux on SSH connection
if [[ -n "$SSH_CONNECTION" ]] && [[ -z "$TMUX" ]] && command -v tmux &> /dev/null; then
tmux attach-session -t default || tmux new-session -s default
fi
# don't put duplicate lines or lines starting with space in the history. # don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options # See bash(1) for more options
HISTCONTROL=ignoreboth HISTCONTROL=ignoreboth