From 16d300d1fea6fda29333d2f18bed0c867db33d95 Mon Sep 17 00:00:00 2001 From: NRK Date: Sat, 1 May 2021 23:21:12 +0600 Subject: [PATCH 1/2] change [[:space:]] to [[:blank]] in $QUERY_TAG possibly better --- sxbm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sxbm b/sxbm index 568b322..bd63160 100755 --- a/sxbm +++ b/sxbm @@ -78,8 +78,8 @@ bm_list(){ case "$1" in +*) [ -z "$QUERY_TAG" ] && - QUERY_TAG="/[[:space:]]\\$1[[:space:]]/" || - QUERY_TAG="${QUERY_TAG} $QUERY_STRICT /[[:space:]]\\$1[[:space:]]/" + QUERY_TAG="/[[:blank:]]\\$1[[:space:]]/" || + QUERY_TAG="${QUERY_TAG} $QUERY_STRICT /[[:blank:]]\\$1[[:space:]]/" shift ;; *) From 334c8986e047ec61b79e4ee68db637c242de6b37 Mon Sep 17 00:00:00 2001 From: NRK Date: Sat, 1 May 2021 23:23:27 +0600 Subject: [PATCH 2/2] fix: also match newline at the end in $QUERY_TAG --- sxbm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sxbm b/sxbm index bd63160..3bd650f 100755 --- a/sxbm +++ b/sxbm @@ -78,8 +78,8 @@ bm_list(){ case "$1" in +*) [ -z "$QUERY_TAG" ] && - QUERY_TAG="/[[:blank:]]\\$1[[:space:]]/" || - QUERY_TAG="${QUERY_TAG} $QUERY_STRICT /[[:blank:]]\\$1[[:space:]]/" + QUERY_TAG="/[[:blank:]]\\$1($| )/" || + QUERY_TAG="${QUERY_TAG} $QUERY_STRICT /[[:blank:]]\\$1($| )/" shift ;; *)