浏览代码

fix(websearch): allow multi-word parameters

Carlo Sala 1 月之前
父节点
当前提交
eeb01c18c1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/web-search/web-search.plugin.zsh

+ 1 - 1
plugins/web-search/web-search.plugin.zsh

@@ -50,7 +50,7 @@ function web_search() {
 
     # build search 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
     # build main page url:
     # split by '/', then rejoin protocol (1) and domain (2) parts with '//'