summaryrefslogtreecommitdiff
path: root/plugins/web-search/README.md
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2020-07-04 11:54:44 -0600
committerTuowen Zhao <ztuowen@gmail.com>2020-07-04 11:54:44 -0600
commit59344b5c59b7190ad3b14a2e8e02db8b5559141b (patch)
treea8e7ede89d3b896967d7d18d071107bd06c77897 /plugins/web-search/README.md
parenta3be2e4084285d7625e63bfe4b951c58143e3c9c (diff)
parenta15f0f0e9ff17c1ca5c6d694d732e72c7c03a62b (diff)
downloadzsh-59344b5c59b7190ad3b14a2e8e02db8b5559141b.tar.gz
zsh-59344b5c59b7190ad3b14a2e8e02db8b5559141b.tar.bz2
zsh-59344b5c59b7190ad3b14a2e8e02db8b5559141b.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/web-search/README.md')
-rw-r--r--plugins/web-search/README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md
index 9c01f0724..da90f90a0 100644
--- a/plugins/web-search/README.md
+++ b/plugins/web-search/README.md
@@ -40,6 +40,8 @@ Available search contexts are:
| `givero` | `https://www.givero.com/search?q=` |
| `stackoverflow` | `https://stackoverflow.com/search?q=` |
| `wolframalpha` | `https://wolframalpha.com/input?i=` |
+| `archive` | `https://web.archive.org/web/*/` |
+| `scholar` | `https://scholar.google.com/scholar?q=` |
Also there are aliases for bang-searching DuckDuckGo:
@@ -51,3 +53,27 @@ Also there are aliases for bang-searching DuckDuckGo:
| `map` | `!m` |
| `image` | `!i` |
| `ducky` | `!` |
+
+### Custom search engines
+
+If you want to add other search contexts to the plugin, you can use the
+`$ZSH_WEB_SEARCH_ENGINES` variable. Set it before Oh My Zsh is sourced,
+with the following format:
+
+```zsh
+ZSH_WEB_SEARCH_ENGINES=(
+ <context> <URL>
+ <context> <URL>
+)
+```
+
+where `<context>` is the name of the search context, and `<URL>` a URL of
+the same type as the search contexts above. For example, to add `reddit`,
+you'd do:
+
+```zsh
+ZSH_WEB_SEARCH_ENGINES=(reddit "https://www.reddit.com/search/?q=")
+```
+
+These custom search engines will also be turned to aliases, so you can
+both do `web_search reddit <query>` or `reddit <query>`.