repo: uritools
action: commit
revision: 
path_from: 
revision_from: 86480f1eca8820cf67c95359780c62c3a89d4485:
path_to: 
revision_to: 
git.thebackupbox.net
uritools
git clone git://git.thebackupbox.net/uritools
commit 86480f1eca8820cf67c95359780c62c3a89d4485
Author: epoch 
Date:   Mon Oct 25 07:49:36 2021 +0000

    escape the single quotes from the env vars that get exported. stuff with x-face data is good for debugging.. derped on a non-empty check of arguments as multiple quoted strings instead of just one.

diff --git a/uristart b/uristart
index a5c3e631c93400c03c042ed0935bbd3936bc7e6a..
index ..2b0d7f28b88f8b0cf6c6de31a4e10040f4436c36 100755
--- a/uristart
+++ b/uristart
@@ -10,6 +10,8 @@ ASKUSER="choose"

 check=dont

+eval "$(printf "%s\n" "$1" | uricut | sed 's/^/export URI/;s/'\''/'\''\\'\'''\''/;s/: /='\''/g;s/$/'\''/')"
+
 uristart_config=~/.config/uristart.conf

 usage() {
@@ -43,7 +45,7 @@ if [ "$verbose" ];then
   echo "uristart: other:" "$@" >&2
 fi

-if [ ! "$@" ];then
+if [ ! "$*" ];then
   usage >&2 #to stderr because it is an error to not have any extra args to process
   exit 1
 fi

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