Created
October 13, 2016 19:35
-
-
Save poindextrose/44e0c40294b16e5a40ef1f8f62eb25a5 to your computer and use it in GitHub Desktop.
launch tmux if connecting via ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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