Created
June 17, 2021 07:16
-
-
Save ideepika/c66baed9b8ae314f38a02e7fdbdcd088 to your computer and use it in GitHub Desktop.
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
| if [[ -z $TMUX ]]; then | |
| builtin exit | |
| return | |
| fi | |
| panes=$(tmux list-panes | wc -l) | |
| wins=$(tmux list-windows | wc -l) | |
| count=$(($panes + $wins - 1)) | |
| if [ $count -eq 1 ]; then | |
| tmux detach | |
| else | |
| builtin exit | |
| fi | |
| } | |
| ^ in server which you are sshing in | |
| the localhost using to ssh | |
| tmosh() { | |
| mosh --no-init $1 -- tmux new-session -ADs $2 | |
| } | |
| should setup tmux+mosh client ssh instance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment