Created
June 8, 2020 11:08
-
-
Save onjin/cd86b706811f15c28837b577b9f13bb2 to your computer and use it in GitHub Desktop.
run tmux on ssh connect
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 [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then | |
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment