Skip to content

Instantly share code, notes, and snippets.

@omasanori
Last active September 8, 2019 05:14
Embed
What would you like to do?
if [ -z "$TMUX" ] && [ -n "$SSH_TTY" ] && [[ $- =~ i ]]; then
tmux attach-session -t "$USER-ssh" 2> /dev/null || tmux new-session -s "$USER-ssh" || exit $?
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment