summaryrefslogtreecommitdiff
path: root/dot/local/bin/ssh-shellwrap
diff options
context:
space:
mode:
Diffstat (limited to 'dot/local/bin/ssh-shellwrap')
-rwxr-xr-xdot/local/bin/ssh-shellwrap19
1 files changed, 19 insertions, 0 deletions
diff --git a/dot/local/bin/ssh-shellwrap b/dot/local/bin/ssh-shellwrap
new file mode 100755
index 0000000..e0d537e
--- /dev/null
+++ b/dot/local/bin/ssh-shellwrap
@@ -0,0 +1,19 @@
1#!/bin/bash
2# ssh wrapper; requires "--" before host argument
3options=()
4while [ $# -gt 0 ]
5do
6 case $1 in
7 -- ) break ;;
8 esac
9 options+=("$1")
10 shift
11done
12set -e
13[ "$1" = '--' ]
14shift
15[ $# -gt 0 ]
16host=$1
17shift
18ssh "${options[@]}" -- "$host" ${*@Q}
19