From 41cbbb6a543242d82a86ce16c416fb0dabddc772 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Thu, 19 Jun 2014 10:58:41 +0300 Subject: [PATCH] improve help --- tmuxssh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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"