diff options
author | Jonas Smedegaard <dr@jones.dk> | 2004-10-23 16:13:42 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2004-10-23 16:13:42 +0000 |
commit | 4dfe44aae0fca53cc9b5fdb469bf561088d609a7 (patch) | |
tree | d822664415befc9027bf276135c31117b1e40c19 | |
parent | 2129b51c9fea70623dc613770fe01c89c8533b1d (diff) |
Verbose mode emits command prior to execution. option -- stops parsing more options. Improved usage message.
-rwxr-xr-x | xsh | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 ";; |