mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
feat(web-search): add chatgpt (#12660)
This commit is contained in:
parent
2abecedf67
commit
f6cd6a7769
2 changed files with 10 additions and 7 deletions
|
@ -50,11 +50,12 @@ Available search contexts are:
|
||||||
| `npmpkg` | `https://www.npmjs.com/search?q=` |
|
| `npmpkg` | `https://www.npmjs.com/search?q=` |
|
||||||
| `packagist` | `https://packagist.org/?query=` |
|
| `packagist` | `https://packagist.org/?query=` |
|
||||||
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
|
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
|
||||||
|
| `chatgpt` | `https://chatgpt.com/?q=` |
|
||||||
|
|
||||||
Also there are aliases for bang-searching DuckDuckGo:
|
Also there are aliases for bang-searching DuckDuckGo:
|
||||||
|
|
||||||
| Context | Bang |
|
| Context | Bang |
|
||||||
| --------- | ----- |
|
| ------- | ---- |
|
||||||
| `wiki` | `!w` |
|
| `wiki` | `!w` |
|
||||||
| `news` | `!n` |
|
| `news` | `!n` |
|
||||||
| `map` | `!m` |
|
| `map` | `!m` |
|
||||||
|
|
|
@ -31,6 +31,7 @@ function web_search() {
|
||||||
npmpkg "https://www.npmjs.com/search?q="
|
npmpkg "https://www.npmjs.com/search?q="
|
||||||
packagist "https://packagist.org/?query="
|
packagist "https://packagist.org/?query="
|
||||||
gopkg "https://pkg.go.dev/search?m=package&q="
|
gopkg "https://pkg.go.dev/search?m=package&q="
|
||||||
|
chatgpt "https://chatgpt.com/?q="
|
||||||
)
|
)
|
||||||
|
|
||||||
# check whether the search engine is supported
|
# check whether the search engine is supported
|
||||||
|
@ -83,6 +84,7 @@ alias dockerhub='web_search dockerhub'
|
||||||
alias npmpkg='web_search npmpkg'
|
alias npmpkg='web_search npmpkg'
|
||||||
alias packagist='web_search packagist'
|
alias packagist='web_search packagist'
|
||||||
alias gopkg='web_search gopkg'
|
alias gopkg='web_search gopkg'
|
||||||
|
alias chatgpt='web_search chatgpt'
|
||||||
|
|
||||||
#add your own !bang searches here
|
#add your own !bang searches here
|
||||||
alias wiki='web_search duckduckgo \!w'
|
alias wiki='web_search duckduckgo \!w'
|
||||||
|
|
Loading…
Reference in a new issue