c91684bb1b723833a96415c2c724332a6e2e620f

Author
Carlo Sala <carlosalag@protonmail.com>
Committer
Carlo Sala <carlosalag@protonmail.com>
Date

Message

docs(web-search): add `youtube` entry

Diff

  1diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md
  2index 0bf9f26ad354702edcb14c750e4296f6621bd5f4..6e4b4d7b8a921245de63f3f3c3f61e8583a29bc0 100644
  3--- a/plugins/web-search/README.md
  4+++ b/plugins/web-search/README.md
  5@@ -12,8 +12,8 @@ plugins=( ... web-search)
  6 
  7 You can use the `web-search` plugin in these two forms:
  8 
  9-* `web_search <context> <term> [more terms if you want]`
 10-* `<context> <term> [more terms if you want]`
 11+- `web_search <context> <term> [more terms if you want]`
 12+- `<context> <term> [more terms if you want]`
 13 
 14 For example, these two are equivalent:
 15 
 16@@ -24,43 +24,42 @@ $ google oh-my-zsh
 17 
 18 Available search contexts are:
 19 
 20-| Context               | URL                                      |
 21-| --------------------- | ---------------------------------------- |
 22-| `bing`                | `https://www.bing.com/search?q=`         |
 23-| `google`              | `https://www.google.com/search?q=`       |
 24-| `brs` or `brave`      | `https://search.brave.com/search?q=`     |
 25-| `yahoo`               | `https://search.yahoo.com/search?p=`     |
 26-| `ddg` or `duckduckgo` | `https://www.duckduckgo.com/?q=`         |
 27-| `sp` or `startpage`   | `https://www.startpage.com/do/search?q=` |
 28-| `yandex`              | `https://yandex.ru/yandsearch?text=`     |
 29-| `github`              | `https://github.com/search?q=`           |
 30-| `baidu`               | `https://www.baidu.com/s?wd=`            |
 31-| `ecosia`              | `https://www.ecosia.org/search?q=`       |
 32-| `goodreads`           | `https://www.goodreads.com/search?q=`    |
 33-| `qwant`               | `https://www.qwant.com/?q=`              |
 34-| `givero`              | `https://www.givero.com/search?q=`       |
 35-| `stackoverflow`       | `https://stackoverflow.com/search?q=`    |
 36-| `wolframalpha`        | `https://wolframalpha.com/input?i=`      |
 37-| `archive`             | `https://web.archive.org/web/*/`         |
 38-| `scholar`             | `https://scholar.google.com/scholar?q=`  |
 39-| `ask`                 | `https://www.ask.com/web?q=`             |
 40+| Context               | URL                                             |
 41+| --------------------- | ----------------------------------------------- |
 42+| `bing`                | `https://www.bing.com/search?q=`                |
 43+| `google`              | `https://www.google.com/search?q=`              |
 44+| `brs` or `brave`      | `https://search.brave.com/search?q=`            |
 45+| `yahoo`               | `https://search.yahoo.com/search?p=`            |
 46+| `ddg` or `duckduckgo` | `https://www.duckduckgo.com/?q=`                |
 47+| `sp` or `startpage`   | `https://www.startpage.com/do/search?q=`        |
 48+| `yandex`              | `https://yandex.ru/yandsearch?text=`            |
 49+| `github`              | `https://github.com/search?q=`                  |
 50+| `baidu`               | `https://www.baidu.com/s?wd=`                   |
 51+| `ecosia`              | `https://www.ecosia.org/search?q=`              |
 52+| `goodreads`           | `https://www.goodreads.com/search?q=`           |
 53+| `qwant`               | `https://www.qwant.com/?q=`                     |
 54+| `givero`              | `https://www.givero.com/search?q=`              |
 55+| `stackoverflow`       | `https://stackoverflow.com/search?q=`           |
 56+| `wolframalpha`        | `https://wolframalpha.com/input?i=`             |
 57+| `archive`             | `https://web.archive.org/web/*/`                |
 58+| `scholar`             | `https://scholar.google.com/scholar?q=`         |
 59+| `ask`                 | `https://www.ask.com/web?q=`                    |
 60+| `youtube`             | `https://www.youtube.com/results?search_query=` |
 61 
 62 Also there are aliases for bang-searching DuckDuckGo:
 63 
 64 | Context   | Bang  |
 65-|-----------|-------|
 66+| --------- | ----- |
 67 | `wiki`    | `!w`  |
 68 | `news`    | `!n`  |
 69-| `youtube` | `!yt` |
 70 | `map`     | `!m`  |
 71 | `image`   | `!i`  |
 72 | `ducky`   | `!`   |
 73 
 74 ### Custom search engines
 75 
 76-If you want to add other search contexts to the plugin, you can use the
 77-`$ZSH_WEB_SEARCH_ENGINES` variable. Set it before Oh My Zsh is sourced,
 78-with the following format:
 79+If you want to add other search contexts to the plugin, you can use the `$ZSH_WEB_SEARCH_ENGINES` variable.
 80+Set it before Oh My Zsh is sourced, with the following format:
 81 
 82 ```zsh
 83 ZSH_WEB_SEARCH_ENGINES=(
 84@@ -69,13 +68,12 @@ ZSH_WEB_SEARCH_ENGINES=(
 85 )
 86 ```
 87 
 88-where `<context>` is the name of the search context, and `<URL>` a URL of
 89-the same type as the search contexts above. For example, to add `reddit`,
 90-you'd do:
 91+where `<context>` is the name of the search context, and `<URL>` a URL of the same type as the search contexts
 92+above. For example, to add `reddit`, you'd do:
 93 
 94 ```zsh
 95 ZSH_WEB_SEARCH_ENGINES=(reddit "https://www.reddit.com/search/?q=")
 96 ```
 97 
 98-These custom search engines will also be turned to aliases, so you can
 99-both do `web_search reddit <query>` or `reddit <query>`.
100+These custom search engines will also be turned to aliases, so you can both do `web_search reddit <query>` or
101+`reddit <query>`.
102diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
103index fc87a34955f794e24374d582dcf0aa222cfb4be1..a8848fd952c10ae9b48475fa2267a684c825301a 100644
104--- a/plugins/web-search/web-search.plugin.zsh
105+++ b/plugins/web-search/web-search.plugin.zsh
106@@ -72,7 +72,6 @@ alias youtube='web_search youtube'
107 #add your own !bang searches here
108 alias wiki='web_search duckduckgo \!w'
109 alias news='web_search duckduckgo \!n'
110-#alias youtube='web_search duckduckgo \!yt'
111 alias map='web_search duckduckgo \!m'
112 alias image='web_search duckduckgo \!i'
113 alias ducky='web_search duckduckgo \!'