mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-29 01:39:01 +01:00
docs(web-search): add youtube
entry
This commit is contained in:
parent
1c55a0fe52
commit
c91684bb1b
@ -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:
|
||||
|
||||
@ -25,7 +25,7 @@ $ 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=` |
|
||||
@ -44,23 +44,22 @@ Available search contexts are:
|
||||
| `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>`.
|
||||
|
@ -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 \!'
|
||||
|
Loading…
Reference in New Issue
Block a user