浏览代码

feat(web-search): add `reddit` (#12664)

Francesco Cataldo 2 月之前
父节点
当前提交
e52598a5cc
共有 2 个文件被更改,包括 3 次插入0 次删除
  1. 1 0
      plugins/web-search/README.md
  2. 2 0
      plugins/web-search/web-search.plugin.zsh

+ 1 - 0
plugins/web-search/README.md

@@ -51,6 +51,7 @@ Available search contexts are:
 | `packagist`           | `https://packagist.org/?query=`                 |
 | `gopkg`               | `https://pkg.go.dev/search?m=package&q=`        |
 | `chatgpt`             | `https://chatgpt.com/?q=`                       |
+| `reddit`              | `https://www.reddit.com/search/?q=`             |
 
 Also there are aliases for bang-searching DuckDuckGo:
 

+ 2 - 0
plugins/web-search/web-search.plugin.zsh

@@ -32,6 +32,7 @@ function web_search() {
     packagist       "https://packagist.org/?query="
     gopkg           "https://pkg.go.dev/search?m=package&q="
     chatgpt         "https://chatgpt.com/?q="
+    reddit          "https://www.reddit.com/search/?q="
   )
 
   # check whether the search engine is supported
@@ -85,6 +86,7 @@ alias npmpkg='web_search npmpkg'
 alias packagist='web_search packagist'
 alias gopkg='web_search gopkg'
 alias chatgpt='web_search chatgpt'
+alias reddit='web_search reddit'
 
 #add your own !bang searches here
 alias wiki='web_search duckduckgo \!w'