浏览代码

feat(web-search): add chatgpt (#12660)

Tulsi Prasad 2 月之前
父节点
当前提交
f6cd6a7769
共有 2 个文件被更改,包括 10 次插入7 次删除
  1. 8 7
      plugins/web-search/README.md
  2. 2 0
      plugins/web-search/web-search.plugin.zsh

+ 8 - 7
plugins/web-search/README.md

@@ -50,16 +50,17 @@ Available search contexts are:
 | `npmpkg`              | `https://www.npmjs.com/search?q=`               |
 | `packagist`           | `https://packagist.org/?query=`                 |
 | `gopkg`               | `https://pkg.go.dev/search?m=package&q=`        |
+| `chatgpt`             | `https://chatgpt.com/?q=`                       |
 
 Also there are aliases for bang-searching DuckDuckGo:
 
-| Context   | Bang  |
-| --------- | ----- |
-| `wiki`    | `!w`  |
-| `news`    | `!n`  |
-| `map`     | `!m`  |
-| `image`   | `!i`  |
-| `ducky`   | `!`   |
+| Context | Bang |
+| ------- | ---- |
+| `wiki`  | `!w` |
+| `news`  | `!n` |
+| `map`   | `!m` |
+| `image` | `!i` |
+| `ducky` | `!`  |
 
 ### Custom search engines
 

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

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