From 43613d7b710f9a06971fac48dea3301bbc15b579 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Wed, 7 Feb 2024 11:16:36 +0100 Subject: [PATCH] fix(web-search): use pattern instead of regex Closes #12202 --- plugins/web-search/web-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 2fe4aea84..c602e0623 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -44,7 +44,7 @@ function web_search() { # if search goes in the query string ==> space as +, otherwise %20 # see https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20 local param="-P" - [[ "$urls[$1]" =~ .*\?.*=$ ]] && param="" + [[ "$urls[$1]" == *\?*= ]] && param="" # build search url: # join arguments passed with '+', then append to search engine URL