Skip to content

Instantly share code, notes, and snippets.

@iacchus
Created July 4, 2017 19:41
Show Gist options
  • Save iacchus/aa6e0314c4d3cacd948475a344c27ac0 to your computer and use it in GitHub Desktop.
Save iacchus/aa6e0314c4d3cacd948475a344c27ac0 to your computer and use it in GitHub Desktop.
make tmux behave well in ssh (append to .bashrc)
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
tmux attach-session -t "$USER" || tmux new-session -s "$USER"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment