summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateus Fernandes de Mello <mt@mfmello.com>2024-02-06 07:26:30 -0300
committerGitHub <noreply@github.com>2024-02-06 11:26:30 +0100
commit883da63320806532f3d3246b03f934e15aff3bab (patch)
treeaf13402911792cd6ff157ec2c96c9fdd20b2bb24
parent212437090032ea1c8c7ccbc1bc2937083c2e7185 (diff)
downloadzsh-883da63320806532f3d3246b03f934e15aff3bab.tar.gz
zsh-883da63320806532f3d3246b03f934e15aff3bab.tar.bz2
zsh-883da63320806532f3d3246b03f934e15aff3bab.zip
feat(web-search): add programming packages search (#12199)
-rw-r--r--plugins/web-search/README.md4
-rw-r--r--plugins/web-search/web-search.plugin.zsh8
2 files changed, 12 insertions, 0 deletions
diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md
index cf5bab3f7..d21c81ca9 100644
--- a/plugins/web-search/README.md
+++ b/plugins/web-search/README.md
@@ -46,6 +46,10 @@ Available search contexts are:
| `ask` | `https://www.ask.com/web?q=` |
| `youtube` | `https://www.youtube.com/results?search_query=` |
| `deepl` | `https://www.deepl.com/translator#auto/auto/` |
+| `dockerhub` | `https://hub.docker.com/search?q=` |
+| `npmpkg` | `https://www.npmjs.com/search?q=` |
+| `packagist` | `https://packagist.org/?query=` |
+| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
Also there are aliases for bang-searching DuckDuckGo:
diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
index 0fa2852dc..2fe4aea84 100644
--- a/plugins/web-search/web-search.plugin.zsh
+++ b/plugins/web-search/web-search.plugin.zsh
@@ -27,6 +27,10 @@ function web_search() {
ask "https://www.ask.com/web?q="
youtube "https://www.youtube.com/results?search_query="
deepl "https://www.deepl.com/translator#auto/auto/"
+ dockerhub "https://hub.docker.com/search?q="
+ npmpkg "https://www.npmjs.com/search?q="
+ packagist "https://packagist.org/?query="
+ gopkg "https://pkg.go.dev/search?m=package&q="
)
# check whether the search engine is supported
@@ -75,6 +79,10 @@ alias scholar='web_search scholar'
alias ask='web_search ask'
alias youtube='web_search youtube'
alias deepl='web_search deepl'
+alias dockerhub='web_search dockerhub'
+alias npmpkg='web_search npmpkg'
+alias packagist='web_search packagist'
+alias gopkg='web_search gopkg'
#add your own !bang searches here
alias wiki='web_search duckduckgo \!w'