Skip to content

Instantly share code, notes, and snippets.

@poindextrose
Created October 13, 2016 19:35
Show Gist options
  • Save poindextrose/44e0c40294b16e5a40ef1f8f62eb25a5 to your computer and use it in GitHub Desktop.
Save poindextrose/44e0c40294b16e5a40ef1f8f62eb25a5 to your computer and use it in GitHub Desktop.
launch tmux if connecting via ssh
# launch tmux if connecting via ssh
if command -v tmux>/dev/null; then
[[ ! -z $SSH_CONNECTION ]] && [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec sh -c 'tmux a || tmux'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment