f6cd6a776993b584f4abbdd204c6e4011b7d2f93
- Author
- Tulsi Prasad <tulsi.prasad50@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
feat(web-search): add chatgpt (#12660)
Diff
1diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md
2index d21c81ca9c566ff216db9571187e779cb778883f..91754ac7f55ad3af852131dccb82b40b47102d9e 100644
3--- a/plugins/web-search/README.md
4+++ b/plugins/web-search/README.md
5@@ -50,16 +50,17 @@ Available search contexts are:
6 | `npmpkg` | `https://www.npmjs.com/search?q=` |
7 | `packagist` | `https://packagist.org/?query=` |
8 | `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
9+| `chatgpt` | `https://chatgpt.com/?q=` |
10
11 Also there are aliases for bang-searching DuckDuckGo:
12
13-| Context | Bang |
14-| --------- | ----- |
15-| `wiki` | `!w` |
16-| `news` | `!n` |
17-| `map` | `!m` |
18-| `image` | `!i` |
19-| `ducky` | `!` |
20+| Context | Bang |
21+| ------- | ---- |
22+| `wiki` | `!w` |
23+| `news` | `!n` |
24+| `map` | `!m` |
25+| `image` | `!i` |
26+| `ducky` | `!` |
27
28 ### Custom search engines
29
30diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
31index c602e062311acbd2bde3c2deafd6c8256ee4a99b..2f524ba1e692d8198ee7c6ab911305ce334f739f 100644
32--- a/plugins/web-search/web-search.plugin.zsh
33+++ b/plugins/web-search/web-search.plugin.zsh
34@@ -31,6 +31,7 @@ function web_search() {
35 npmpkg "https://www.npmjs.com/search?q="
36 packagist "https://packagist.org/?query="
37 gopkg "https://pkg.go.dev/search?m=package&q="
38+ chatgpt "https://chatgpt.com/?q="
39 )
40
41 # check whether the search engine is supported
42@@ -83,6 +84,7 @@ alias dockerhub='web_search dockerhub'
43 alias npmpkg='web_search npmpkg'
44 alias packagist='web_search packagist'
45 alias gopkg='web_search gopkg'
46+alias chatgpt='web_search chatgpt'
47
48 #add your own !bang searches here
49 alias wiki='web_search duckduckgo \!w'