From 67e72130fec97cf31051fb48595b6b94c834054f Mon Sep 17 00:00:00 2001 From: Gordon GECOS Date: Thu, 1 Jun 2023 11:10:05 -0400 Subject: new command ssh-shellwrap --- dot/local/bin/ssh-shellwrap | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 dot/local/bin/ssh-shellwrap 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 @@ +#!/bin/bash +# ssh wrapper; requires "--" before host argument +options=() +while [ $# -gt 0 ] +do + case $1 in + -- ) break ;; + esac + options+=("$1") + shift +done +set -e +[ "$1" = '--' ] +shift +[ $# -gt 0 ] +host=$1 +shift +ssh "${options[@]}" -- "$host" ${*@Q} + -- cgit v1.2.3