3 This plugin adds aliases for searching with Google, Wiki, Bing, YouTube and other popular services.
5 Open your `~/.zshrc` file and enable the `web-search` plugin:
8 plugins=( ... web-search)
13 You can use the `web-search` plugin in these two forms:
15 * `web_search <context> <term> [more terms if you want]`
16 * `<context> <term> [more terms if you want]`
18 For example, these two are equivalent:
21 $ web_search google oh-my-zsh
25 Available search contexts are:
28 | --------------------- | ---------------------------------------- |
29 | `bing` | `https://www.bing.com/search?q=` |
30 | `google` | `https://www.google.com/search?q=` |
31 | `brs` or `brave` | `https://search.brave.com/search?q=` |
32 | `yahoo` | `https://search.yahoo.com/search?p=` |
33 | `ddg` or `duckduckgo` | `https://www.duckduckgo.com/?q=` |
34 | `sp` or `startpage` | `https://www.startpage.com/do/search?q=` |
35 | `yandex` | `https://yandex.ru/yandsearch?text=` |
36 | `github` | `https://github.com/search?q=` |
37 | `baidu` | `https://www.baidu.com/s?wd=` |
38 | `ecosia` | `https://www.ecosia.org/search?q=` |
39 | `goodreads` | `https://www.goodreads.com/search?q=` |
40 | `qwant` | `https://www.qwant.com/?q=` |
41 | `givero` | `https://www.givero.com/search?q=` |
42 | `stackoverflow` | `https://stackoverflow.com/search?q=` |
43 | `wolframalpha` | `https://wolframalpha.com/input?i=` |
44 | `archive` | `https://web.archive.org/web/*/` |
45 | `scholar` | `https://scholar.google.com/scholar?q=` |
47 Also there are aliases for bang-searching DuckDuckGo:
58 ### Custom search engines
60 If you want to add other search contexts to the plugin, you can use the
61 `$ZSH_WEB_SEARCH_ENGINES` variable. Set it before Oh My Zsh is sourced,
62 with the following format:
65 ZSH_WEB_SEARCH_ENGINES=(
71 where `<context>` is the name of the search context, and `<URL>` a URL of
72 the same type as the search contexts above. For example, to add `reddit`,
76 ZSH_WEB_SEARCH_ENGINES=(reddit "https://www.reddit.com/search/?q=")
79 These custom search engines will also be turned to aliases, so you can
80 both do `web_search reddit <query>` or `reddit <query>`.