summaryrefslogtreecommitdiff
path: root/dot/local/bin/ssh-shellwrap
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2024-01-19 12:01:49 -0500
committerAndrew Cady <d@jerkface.net>2024-01-19 12:01:49 -0500
commita74be3f9e73d9dd10eee890e673d00bfb44e5cfb (patch)
treed6ac57f28cdd7bf0283234e4730275c0b6afb565 /dot/local/bin/ssh-shellwrap
parent66a483f0101ec54bd8db0f7d20ed83fe2f615cf4 (diff)
parentf58705ed7c600a1d394c6949bb7e21cfd29e6260 (diff)
Merge commit 'f587'HEADmaster
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