fix(websearch): allow multi-word parameters

This commit is contained in:
Carlo Sala 2024-10-23 12:37:25 +02:00
parent 7bbebcd520
commit eeb01c18c1
No known key found for this signature in database
GPG key ID: DA6FB450C1A4FE9A

View file

@ -50,7 +50,7 @@ function web_search() {
# build search url: # build search url:
# join arguments passed with '+', then append to search engine URL # join arguments passed with '+', then append to search engine URL
url="${urls[$1]}$(omz_urlencode $param ${@[2,-1]})" url="${urls[$1]}$(omz_urlencode $param ${(s: :)@[2,-1]})"
else else
# build main page url: # build main page url:
# split by '/', then rejoin protocol (1) and domain (2) parts with '//' # split by '/', then rejoin protocol (1) and domain (2) parts with '//'