summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCarlo Sala <carlosalag@protonmail.com>2023-09-25 08:20:20 +0100
committerCarlo Sala <carlosalag@protonmail.com>2023-09-25 08:20:20 +0100
commitc91684bb1b723833a96415c2c724332a6e2e620f (patch)
treeb61515f331409f321ed096103bdf7a471289cf77 /plugins
parent1c55a0fe5246487ec9f18e03b7f28862b76cb7ab (diff)
downloadzsh-c91684bb1b723833a96415c2c724332a6e2e620f.tar.gz
zsh-c91684bb1b723833a96415c2c724332a6e2e620f.tar.bz2
zsh-c91684bb1b723833a96415c2c724332a6e2e620f.zip
docs(web-search): add `youtube` entry
Diffstat (limited to 'plugins')
-rw-r--r--plugins/web-search/README.md62
-rw-r--r--plugins/web-search/web-search.plugin.zsh1
2 files changed, 30 insertions, 33 deletions
diff --git a/plugins/web-search/README.md b/plugins/web-search/README.md
index 0bf9f26ad..6e4b4d7b8 100644
--- a/plugins/web-search/README.md
+++ b/plugins/web-search/README.md
@@ -12,8 +12,8 @@ plugins=( ... web-search)
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]`
+- `web_search <context> <term> [more terms if you want]`
+- `<context> <term> [more terms if you want]`
For example, these two are equivalent:
@@ -24,43 +24,42 @@ $ google oh-my-zsh
Available search contexts are:
-| Context | URL |
-| --------------------- | ---------------------------------------- |
-| `bing` | `https://www.bing.com/search?q=` |
-| `google` | `https://www.google.com/search?q=` |
-| `brs` or `brave` | `https://search.brave.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=` |
-| `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=` |
-| `ask` | `https://www.ask.com/web?q=` |
+| Context | URL |
+| --------------------- | ----------------------------------------------- |
+| `bing` | `https://www.bing.com/search?q=` |
+| `google` | `https://www.google.com/search?q=` |
+| `brs` or `brave` | `https://search.brave.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=` |
+| `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=` |
+| `ask` | `https://www.ask.com/web?q=` |
+| `youtube` | `https://www.youtube.com/results?search_query=` |
Also there are aliases for bang-searching DuckDuckGo:
| Context | Bang |
-|-----------|-------|
+| --------- | ----- |
| `wiki` | `!w` |
| `news` | `!n` |
-| `youtube` | `!yt` |
| `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:
+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=(
@@ -69,13 +68,12 @@ ZSH_WEB_SEARCH_ENGINES=(
)
```
-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:
+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>`.
+These custom search engines will also be turned to aliases, so you can both do `web_search reddit <query>` or
+`reddit <query>`.
diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
index fc87a3495..a8848fd95 100644
--- a/plugins/web-search/web-search.plugin.zsh
+++ b/plugins/web-search/web-search.plugin.zsh
@@ -72,7 +72,6 @@ alias youtube='web_search youtube'
#add your own !bang searches here
alias wiki='web_search duckduckgo \!w'
alias news='web_search duckduckgo \!n'
-#alias youtube='web_search duckduckgo \!yt'
alias map='web_search duckduckgo \!m'
alias image='web_search duckduckgo \!i'
alias ducky='web_search duckduckgo \!'