summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCarlo Sala <carlosalag@protonmail.com>2024-02-07 11:16:36 +0100
committerCarlo Sala <carlosalag@protonmail.com>2024-02-07 11:16:36 +0100
commit43613d7b710f9a06971fac48dea3301bbc15b579 (patch)
tree7b0d899c48b041395108f8595e43f18eeac824f2 /plugins
parent883da63320806532f3d3246b03f934e15aff3bab (diff)
downloadzsh-43613d7b710f9a06971fac48dea3301bbc15b579.tar.gz
zsh-43613d7b710f9a06971fac48dea3301bbc15b579.tar.bz2
zsh-43613d7b710f9a06971fac48dea3301bbc15b579.zip
fix(web-search): use pattern instead of regex
Closes #12202
Diffstat (limited to 'plugins')
-rw-r--r--plugins/web-search/web-search.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
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