summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprintfurl2
-rwxr-xr-xstart2
2 files changed, 2 insertions, 2 deletions
diff --git a/printfurl b/printfurl
index 91fd388..c141bc1 100755
--- a/printfurl
+++ b/printfurl
@@ -1,5 +1,5 @@
#!/bin/sh
-cutargs="$(printf "%s\n" "$1" | tr '%' '\n' | tail -n+2 | grep '^[sukdPpqfU]' | sed 's/^\(.\).*/-\1/g')"
+cutargs="$(printf "%s\n" "$1" | sed 's/%[^sukdPpqfU]//g' | tr '%' '\n' | tail -n+2 | sed 's/^\(.\).*/-\1/g' | tr '\n' ' ')"
count="$(echo $cutargs | tr '-' '\n' | grep -c .)"
printfargs="$(printf "%s\n" "$1" | sed 's/%[sukdPpqfU]/%s/g')"
cuturl "$cutargs" | tr '\n' '\0' | xargs -n $count -0 printf "$printfargs"
diff --git a/start b/start
index 873f792..9a3dca6 100755
--- a/start
+++ b/start
@@ -1,4 +1,4 @@
#!/bin/sh
scheme="$(printf "%s\n" "$1" | cuturl -s)"
line="$(grep "^${scheme}:" ~/.config/start.conf | cut -d: -f2-)"
-eval "$(printf "%s\n" "$1" | printfurl "$line" )"
+eval "$(printf "%s\n" "$1" | sed 's/'\''/'\''\\'\'''\''/g' | printfurl "$line")"