Created
July 29, 2019 15:53
-
-
Save auxiliary/4358040a199c39ee1ae0f228bc31c16b to your computer and use it in GitHub Desktop.
Always connect to same tmux session
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
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then | |
tmux attach-session -t $(hostname) || tmux new-session -s $(hostname) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment