Skip to content

Instantly share code, notes, and snippets.

@xiao0yy
Created February 24, 2020 03:18
Show Gist options
  • Save xiao0yy/2f0c5a055209862daf374460ebe52794 to your computer and use it in GitHub Desktop.
Save xiao0yy/2f0c5a055209862daf374460ebe52794 to your computer and use it in GitHub Desktop.
tmux in ssh/mosh
sst() {
prune_str=${1#*@}
formatted=$prune_str[-8,$#prune_str]
/usr/bin/ssh -t "$@" "LANG=$LANG tmux new -A -s $formatted"
}
mot() {
prune_str=${1#*@}
formatted=$prune_str[-8,$#prune_str]
/usr/local/bin/mosh "$@" -- tmux new -A -s $formatted
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment