diff options
author | Jonas Smedegaard <dr@jones.dk> | 2016-10-22 18:24:45 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2016-10-22 19:02:56 +0200 |
commit | a18858bcc1048d7c303f8d6c34f640713cfa489a (patch) | |
tree | 6a5ddc6a78404ec9d993c2b4e2ec675a7e23587f | |
parent | dbc7fe7a5710bdd93d467ed11b9044949463d4a0 (diff) |
Tidy terminal emulator call (drop wrapper).
-rwxr-xr-x | xsh | 22 |
1 files changed, 8 insertions, 14 deletions
@@ -6,19 +6,6 @@ usage() { echo "Usage: $SCRIPT [--x] [--verbose] [su|sudo] [[{user}]@{host}] [[--] command...]" } -termwrapper() { - if [ "$V" = 1 ]; then - echo "$@" - sleep 4 - fi - - if [ $# -gt 0 ]; then - x-terminal-emulator -e "$@" & - else - x-terminal-emulator & - fi -} - # Initial setup SU='' SUDO='' @@ -55,4 +42,11 @@ done [ -z "$HOST" ] || set -- ssh -t${X:+ -X}${V:+ -v}${PORT:+ -p "$PORT"} $HOST "$@" -termwrapper "$@" +[ -z "$V" ] || echo "$@" +[ -z "$V" ] || sleep 4 + +if [ $# -gt 0 ]; then + x-terminal-emulator -e "$@" & +else + x-terminal-emulator & +fi |