repo: uritools
action: commit
revision: 
path_from: 
revision_from: fcc1f63e0e3755b818e5bae73385a02c52f2e85a:
path_to: 
revision_to: 
git.thebackupbox.net
uritools
git clone git://git.thebackupbox.net/uritools
commit fcc1f63e0e3755b818e5bae73385a02c52f2e85a
Author: epoch 
Date:   Thu Aug 17 15:25:31 2023 -0500

    I think I commitd without testing that it worked. also ssh_hack fixed for the changed path thing

diff --git a/ssh_hack b/ssh_hack
index cac6623e4601f1877f747e76d543ba026a09e6fc..
index ..ca9ae26f6f5422270776a473666b398f9535433c 100755
--- a/ssh_hack
+++ b/ssh_hack
@@ -7,6 +7,7 @@ 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)"
+f="$(printf "%s\n" "$uri" | uricut -f)" #use this for port forwards and extra ssh arguments I guess

 eval "$(printf '%s\n' "$q" | tr '&' ' ' | grep '[^ ]*=' | sed 's/^/export /g')"
 if [ "$p" ];then
@@ -24,9 +25,9 @@ set_terminal_title "$uri"
 if [ "$q" ];then
   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}
+  ssh -F "$tmpfile" -t ${HACK_PORT} ${HACK_USER}${d} ${p}
 else
-  ssh -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}
+  ssh -t ${HACK_PORT} ${HACK_USER}${d} ${p}
 fi
 #ssh -F <(printf '%s\n' "$q" | tr '&' '\n' | cut -d= -f1 | sed 's/^/SendEnv /g') -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}
 #ssh -F <(printf '%s\n' "$q" | tr '&' '\n' | cut -d= -f1 | sed 's/^/SendEnv /g') -t ${HACK_PORT} ${HACK_USER}${d} ${p:1}
diff --git a/uri.h b/uri.h
index a33a92694356abd8f72d0c5d965266dbd583f808..
index ..e0dfc31094f5239e39cbb14c38c4097395c01020 100644
--- a/uri.h
+++ b/uri.h
@@ -121,6 +121,7 @@ unsigned int uricmp(struct uri *a,struct uri *b) {
 char *linefromuri(struct uri *u) {
   int len=16; // length of all delimiters we might get... :// : @ [ ] :  / ? # (and 5 more for good luck)
   char *line;
+  int i=0;
   for(i=0;i<8;i++) {
     if(u->A[i]) len+=strlen(u->A[i]);
   }

-----END OF PAGE-----