diff --git a/tmuxssh b/tmuxssh index 5502256..a737e8e 100755 --- a/tmuxssh +++ b/tmuxssh @@ -1,6 +1,21 @@ #!/bin/bash -HOSTS=( vm3 vm4 vm5 vm6 vm7 vm8 vm9 vm10 ) + +HELP=" +Arguments: hostnames, or username@hostnames + ctrl-b m to toggle pane synchronization + ctrl-b arrows to move between tiles + +" +[[ -z "$1" ]] && { + echo "$HELP" + exit +} +[[ "$1" = "-h" ]] && { + echo "$HELP" + exit +} + tmux new-session -d -s ssh$USER 'ssh '$1 tmux set-window-option -t:0 synchronize-panes on @@ -13,5 +28,3 @@ done tmux -2 attach-session -t ssh$USER -echo "ctrl-b m to toggle pane synchronization" -echo "ctrl-b arrows to move between tiles"