summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2016-10-22 18:24:45 +0200
committerJonas Smedegaard <dr@jones.dk>2016-10-22 19:02:56 +0200
commita18858bcc1048d7c303f8d6c34f640713cfa489a (patch)
tree6a5ddc6a78404ec9d993c2b4e2ec675a7e23587f
parentdbc7fe7a5710bdd93d467ed11b9044949463d4a0 (diff)
Tidy terminal emulator call (drop wrapper).
-rwxr-xr-xxsh22
1 files changed, 8 insertions, 14 deletions
diff --git a/xsh b/xsh
index 74d32a9..081d471 100755
--- a/xsh
+++ b/xsh
@@ -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