Created
February 24, 2020 03:18
-
-
Save xiao0yy/2f0c5a055209862daf374460ebe52794 to your computer and use it in GitHub Desktop.
tmux in ssh/mosh
This file contains hidden or 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
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