e52598a5cc3c73fa907f83c84f4270fdaee9c930

Author
Francesco Cataldo <78490028+FraCata00@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

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

Diff

 1diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md
 2index 91754ac7f55ad3af852131dccb82b40b47102d9e..ad3741fc967d736aeb94c9e7527c7e9e937360ba 100644
 3--- a/plugins/web-search/README.md
 4+++ b/plugins/web-search/README.md
 5@@ -51,6 +51,7 @@ Available search contexts are:
 6 | `packagist`           | `https://packagist.org/?query=`                 |
 7 | `gopkg`               | `https://pkg.go.dev/search?m=package&q=`        |
 8 | `chatgpt`             | `https://chatgpt.com/?q=`                       |
 9+| `reddit`              | `https://www.reddit.com/search/?q=`             |
10 
11 Also there are aliases for bang-searching DuckDuckGo:
12 
13diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
14index 2f524ba1e692d8198ee7c6ab911305ce334f739f..81eb1c77d9c7bad8048079b98961b81e53603d6e 100644
15--- a/plugins/web-search/web-search.plugin.zsh
16+++ b/plugins/web-search/web-search.plugin.zsh
17@@ -32,6 +32,7 @@ function web_search() {
18     packagist       "https://packagist.org/?query="
19     gopkg           "https://pkg.go.dev/search?m=package&q="
20     chatgpt         "https://chatgpt.com/?q="
21+    reddit          "https://www.reddit.com/search/?q="
22   )
23 
24   # check whether the search engine is supported
25@@ -85,6 +86,7 @@ alias npmpkg='web_search npmpkg'
26 alias packagist='web_search packagist'
27 alias gopkg='web_search gopkg'
28 alias chatgpt='web_search chatgpt'
29+alias reddit='web_search reddit'
30 
31 #add your own !bang searches here
32 alias wiki='web_search duckduckgo \!w'