From 4dfe44aae0fca53cc9b5fdb469bf561088d609a7 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 23 Oct 2004 16:13:42 +0000 Subject: Verbose mode emits command prior to execution. option -- stops parsing more options. Improved usage message. --- xsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xsh') diff --git a/xsh b/xsh index 1e66121..bc154e8 100755 --- a/xsh +++ b/xsh @@ -3,13 +3,16 @@ SCRIPT=$(basename $0) function usage () { - echo "Usage: $SCRIPT [--x] [--verbose] [[--su |{user}@]{host}]" + echo "Usage: $SCRIPT [--x] [--verbose] [[--su |{user}@]{host}] [--] [remote command...]" } function termwrapper () { PRG=$@ titletext="$title $titleopt" - [ "$V" = 1 ] && echo $PRG + if [ "$V" = 1 ]; then + echo $PRG + sleep 4 + fi case `readlink /etc/alternatives/x-terminal-emulator | xargs basename` in # rxvt*) opts="+sb -sl 500 -n \"$titletext\""; titleoptname="-title";; @@ -55,6 +58,7 @@ while [ $# -gt 0 ]; do --port|-p) ssh_opts="$ssh_opts -p $2"; shift;; --host|-h) HOST=$1;; -) HOST="localhost";; + --) shift; args="$args$@ "; break;; -*) usage; exit 1;; root@*) HOST="$1"; SU=1; SUHACK=1;; *) args="$args$1 ";; -- cgit v1.2.3