From ca8db6208fbc33acf5ecfa4745ca3d7788579f57 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 2 Mar 2021 17:58:22 -0600 Subject: Fix tiny bugs The rubber ducky method works!! --- bollux | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/bollux b/bollux index c33ba6e..da93e43 100644 --- a/bollux +++ b/bollux @@ -378,11 +378,12 @@ usplit() { # usplit NAME:ARRAY URL:STRING [[ $2 =~ $re ]] || return $? # shellcheck disable=2034 - local scheme="${BASH_REMATCH[2]}" \ - authority="${BASH_REMATCH[4]}" \ - path="${BASH_REMATCH[5]}" \ - query="${BASH_REMATCH[7]}" \ - fragment="${BASH_REMATCH[9]}" + local url="${BASH_REMATCH[0]}" \ + scheme="${BASH_REMATCH[2]}" \ + authority="${BASH_REMATCH[4]}" \ + path="${BASH_REMATCH[5]}" \ + query="${BASH_REMATCH[7]}" \ + fragment="${BASH_REMATCH[9]}" # 0=url 1=scheme 2=authority 3=path 4=query 5=fragment local i=1 c @@ -390,13 +391,11 @@ usplit() { # usplit NAME:ARRAY URL:STRING if [[ "${!c}" || "$c" == path ]]; then printf -v "$1[$i]" '%s' "${!c}" else - # shellcheck disable=2059 - printf -v "$1[$i]" "$UC_BLANK" + printf -v "$1[$i]" '%s' "$UC_BLANK" fi ((i += 1)) done - # shellcheck disable=2059 - printf -v "$1[0]" "$(ujoin "$1")" # inefficient I'm sure + printf -v "$1[0]" '%s' "$url" } ujoin() { # ujoin NAME:ARRAY -- cgit 1.4.1-21-gabe81