From d904e5b7a55c5c3d80b347bd748c0085a2ff4945 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Sat, 30 Jan 2021 21:05:49 -0600 Subject: [PATCH] Add support for *,the filenames --- wyrics | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wyrics b/wyrics index ae4773c..d512ab3 100755 --- a/wyrics +++ b/wyrics @@ -22,13 +22,15 @@ function search { # sanitize search strings function sanitize { - local str="$(echo "$1" | sed 's/ /%2A/g')" + local str="$1" - if echo "$str" | grep ',the\.' >/dev/null; then - str="the%2A${str}" + if echo "$str" | grep ',the' >/dev/null; then + str="the%2A$(echo "$str" | sed 's%,the%%')" fi - echo "$str" + echo "$str" \ + | sed 's/ /%2A/g' \ + | sed 's/_/%2A/g' } # --------------------------------------