README.md 1.89 KB
Newer Older
Denys Dovhan's avatar
Denys Dovhan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# web-search plugin

This plugin adds aliases for searching with Google, Wiki, Bing, YouTube and other popular services.

Open your `~/.zshrc` file and enable the `web-search` plugin:

```zsh
plugins=( ... web-search)
```

## Usage

You can use the `web-search` plugin in these two forms:

* `web_search <context> <term> [more terms if you want]`
* `<context> <term> [more terms if you want]`

For example, these two are equivalent:

```zsh
$ web_search google oh-my-zsh
$ google oh-my-zsh
```

Available search contexts are:

| Context               | URL                                      |
|-----------------------|------------------------------------------|
| `bing`                | `https://www.bing.com/search?q=`         |
| `google`              | `https://www.google.com/search?q=`       |
| `yahoo`               | `https://search.yahoo.com/search?p=`     |
| `ddg` or `duckduckgo` | `https://www.duckduckgo.com/?q=`         |
| `sp` or `startpage`   | `https://www.startpage.com/do/search?q=` |
| `yandex`              | `https://yandex.ru/yandsearch?text=`     |
| `github`              | `https://github.com/search?q=`           |
| `baidu`               | `https://www.baidu.com/s?wd=`            |
| `ecosia`              | `https://www.ecosia.org/search?q=`       |
| `goodreads`           | `https://www.goodreads.com/search?q=`    |
| `qwant`               | `https://www.qwant.com/?q=`              |
40
| `givero`              | `https://www.givero.com/search?q=`       |
41
| `stackoverflow`       | `https://stackoverflow.com/search?q=`    |
42
| `wolframalpha`        | `https://wolframalpha.com/input?i=`      |
43
| `archive`             | `https://web.archive.org/web/*/`         |
Denys Dovhan's avatar
Denys Dovhan committed
44
45
46
47
48
49
50
51
52
53
54

Also there are aliases for bang-searching DuckDuckGo:

| Context   | Bang  |
|-----------|-------|
| `wiki`    | `!w`  |
| `news`    | `!n`  |
| `youtube` | `!yt` |
| `map`     | `!m`  |
| `image`   | `!i`  |
| `ducky`   | `!`   |