Skip to content

Instantly share code, notes, and snippets.

@sbriskin
Last active December 18, 2018 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbriskin/8710e1101b49c0251f96f888b9a9b90a to your computer and use it in GitHub Desktop.
Save sbriskin/8710e1101b49c0251f96f888b9a9b90a to your computer and use it in GitHub Desktop.
alias hello='tmux attach || tmux new -s ${USER}'
alias bye='tmux detach'
# set terminal as VT100 from mobile ssh client or delete this check below
if [ $TERM == "vt100" ]; then
TERM="xterm-256color" # bring back colors
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ] ; then
tmux attach-session -t $USER || tmux new-session -s $USER
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment