repo: uritools action: commit revision: path_from: revision_from: c5e49f1a3529fd1f7928fb679ad7d9a652e87c45: path_to: revision_to:
commit c5e49f1a3529fd1f7928fb679ad7d9a652e87c45 Author: epochDate: Thu Feb 24 01:46:37 2022 +0000 switched from using $1 in multiple spots to using $uri. set the teminal's title to the URI so I can copy it out later with tools in xtools repo diff --git a/ssh_hack b/ssh_hack
--- a/ssh_hack
+++ b/ssh_hack
@@ -1,11 +1,12 @@
#!/usr/bin/env bash
### we need to export each of the query string variables
### then send them over ssh
-q="$(printf "%s\n" "$1" | uricut -q)"
-p="$(printf "%s\n" "$1" | uricut -p)"
-d="$(printf "%s\n" "$1" | uricut -d)"
-P="$(printf "%s\n" "$1" | uricut -P)"
-u="$(printf "%s\n" "$1" | uricut -u)"
+uri="$1"
+q="$(printf "%s\n" "$uri" | uricut -q)"
+p="$(printf "%s\n" "$uri" | uricut -p)"
+d="$(printf "%s\n" "$uri" | uricut -d)"
+P="$(printf "%s\n" "$uri" | uricut -P)"
+u="$(printf "%s\n" "$uri" | uricut -u)"
eval "$(printf '%s\n' "$q" | tr '&' ' ' | grep '[^ ]*=' | sed 's/^/export /g')"
if [ "$p" ];then
@@ -18,8 +19,10 @@ if [ "$u" ];then
HACK_USER="$u@"
fi
+set_terminal_title "$uri"
+
if [ "$q" ];then
-tmpfile=$(mktemp);
+ tmpfile=$(mktemp);
printf '%s\n' "$q" | tr '&' '\n' | cut -d= -f1 | sed 's/^/SendEnv /g' > "$tmpfile"
ssh -F "$tmpfile" -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}
else
-----END OF PAGE-----