diff --git a/config/bash/shell b/config/bash/shell index 928eb6e..2e81960 100644 --- a/config/bash/shell +++ b/config/bash/shell @@ -21,7 +21,6 @@ export PATH="$HOME/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin: # Nvm source /etc/profile.d/nvm.sh - # Auto-switch Node version when entering a directory with .nvmrc _nvm_auto_use() { if [[ -f .nvmrc ]]; then @@ -30,6 +29,11 @@ _nvm_auto_use() { } export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }_nvm_auto_use" +# Auto-start or attach tmux for SSH interactive shells +if [[ -n "$SSH_CONNECTION" && -z "$TMUX" && $- == *i* ]]; then + exec tmux new-session -A -s main +fi + # Zoxide eval "$(zoxide init bash)"