aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfbt <fbt@fleshless.org>2019-06-16 14:53:37 +0300
committerfbt <fbt@fleshless.org>2019-06-16 14:53:37 +0300
commit8f4b3af31ca317a78ec0f02297aebedf1b23a384 (patch)
treedf63f5e0fc6961dbb23d737f38c8a6dae92a252b
parent27801d670fb4fc5283169cbacf5ff6ddaeea3ef8 (diff)
downloadsx-open-8f4b3af31ca317a78ec0f02297aebedf1b23a384.tar.gz
sx-open-8f4b3af31ca317a78ec0f02297aebedf1b23a384.zip
decode the URI alwaysHEAD1.6.4master
Signed-off-by: fbt <fbt@fleshless.org>
-rwxr-xr-xsx-open3
1 files changed, 3 insertions, 0 deletions
diff --git a/sx-open b/sx-open
index f56d9f8..a2c255f 100755
--- a/sx-open
+++ b/sx-open
@@ -19,6 +19,8 @@ act() {
return 0
}
+urldecode() { : "${*//+/ }"; printf '%b\n' "${_//%/\\x}"; }
+
# cfg foo bool = [true|1]
# cfg foo [string] = 'bar'
# cfg foo
@@ -221,6 +223,7 @@ main() {
done
target=$1; [[ "$target" ]] || { usage; exit; }
+ target=$(urldecode "$target")
cfg dryrun && {
printf 'Dry run: not actually running the handler\n' >&2