Created
August 12, 2019 15:07
-
-
Save WMcKibbin/d72351d75e05a49c995859147bb73a0d to your computer and use it in GitHub Desktop.
Revisions
-
WMcKibbin created this gist
Aug 12, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/bin/bash # Assume session is 0 tmux attach-session -t 0 WINDOW=$(tmux display-message -p "#I") FIRST_ARG="" for arg in $*; do if [[ $arg != *"%"* ]]; then if [[ $FIRST_ARG == "" ]]; then FIRST_ARG=$arg tmux send-keys "ssh $arg" Enter else tmux split-window "ssh $arg" fi tmux select-layout tiled fi done tmux set-window-option synchronize-panes on