35a5357704ace1d9732a15cc3a5d792df53f2170

Author
とんとんぼ <70003919+KaitoMuraoka@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(web-search): add `deepL` (#12165)

Diff

 1diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md
 2index 6e4b4d7b8a921245de63f3f3c3f61e8583a29bc0..cf5bab3f78bf77b8596fb45a79b6a5e8472c4de9 100644
 3--- a/plugins/web-search/README.md
 4+++ b/plugins/web-search/README.md
 5@@ -45,6 +45,7 @@ Available search contexts are:
 6 | `scholar`             | `https://scholar.google.com/scholar?q=`         |
 7 | `ask`                 | `https://www.ask.com/web?q=`                    |
 8 | `youtube`             | `https://www.youtube.com/results?search_query=` |
 9+| `deepl`               | `https://www.deepl.com/translator#auto/auto/`   |
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 a8848fd952c10ae9b48475fa2267a684c825301a..1b42abe86a9cf84ef3d7b69332d41b20b77b04c0 100644
15--- a/plugins/web-search/web-search.plugin.zsh
16+++ b/plugins/web-search/web-search.plugin.zsh
17@@ -26,6 +26,7 @@ function web_search() {
18     scholar         "https://scholar.google.com/scholar?q="
19     ask             "https://www.ask.com/web?q="
20     youtube         "https://www.youtube.com/results?search_query="
21+    deepl           "https://www.deepl.com/translator#auto/auto/"
22   )
23 
24   # check whether the search engine is supported
25@@ -68,6 +69,7 @@ alias archive='web_search archive'
26 alias scholar='web_search scholar'
27 alias ask='web_search ask'
28 alias youtube='web_search youtube'
29+alias deepl='web_search deepl'
30 
31 #add your own !bang searches here
32 alias wiki='web_search duckduckgo \!w'