Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
c91684bb
Unverified
Commit
c91684bb
authored
Sep 25, 2023
by
Carlo Sala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(web-search): add `youtube` entry
parent
1c55a0fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
README.md
plugins/web-search/README.md
+11
-13
web-search.plugin.zsh
plugins/web-search/web-search.plugin.zsh
+0
-1
No files found.
plugins/web-search/README.md
View file @
c91684bb
...
@@ -12,8 +12,8 @@ plugins=( ... web-search)
...
@@ -12,8 +12,8 @@ plugins=( ... web-search)
You can use the
`web-search`
plugin in these two forms:
You can use the
`web-search`
plugin in these two forms:
*
`web_search <context> <term> [more terms if you want]`
-
`web_search <context> <term> [more terms if you want]`
*
`<context> <term> [more terms if you want]`
-
`<context> <term> [more terms if you want]`
For example, these two are equivalent:
For example, these two are equivalent:
...
@@ -25,7 +25,7 @@ $ google oh-my-zsh
...
@@ -25,7 +25,7 @@ $ google oh-my-zsh
Available search contexts are:
Available search contexts are:
| Context | URL |
| Context | URL |
| --------------------- | ---------------------------------------- |
| --------------------- | ----------------------------------------
-------
|
|
`bing`
|
`https://www.bing.com/search?q=`
|
|
`bing`
|
`https://www.bing.com/search?q=`
|
|
`google`
|
`https://www.google.com/search?q=`
|
|
`google`
|
`https://www.google.com/search?q=`
|
|
`brs`
or
`brave`
|
`https://search.brave.com/search?q=`
|
|
`brs`
or
`brave`
|
`https://search.brave.com/search?q=`
|
...
@@ -44,23 +44,22 @@ Available search contexts are:
...
@@ -44,23 +44,22 @@ Available search contexts are:
|
`archive`
|
`https://web.archive.org/web/*/`
|
|
`archive`
|
`https://web.archive.org/web/*/`
|
|
`scholar`
|
`https://scholar.google.com/scholar?q=`
|
|
`scholar`
|
`https://scholar.google.com/scholar?q=`
|
|
`ask`
|
`https://www.ask.com/web?q=`
|
|
`ask`
|
`https://www.ask.com/web?q=`
|
|
`youtube`
|
`https://www.youtube.com/results?search_query=`
|
Also there are aliases for bang-searching DuckDuckGo:
Also there are aliases for bang-searching DuckDuckGo:
| Context | Bang |
| Context | Bang |
|
-----------|-------
|
|
--------- | -----
|
|
`wiki`
|
`!w`
|
|
`wiki`
|
`!w`
|
|
`news`
|
`!n`
|
|
`news`
|
`!n`
|
|
`youtube`
|
`!yt`
|
|
`map`
|
`!m`
|
|
`map`
|
`!m`
|
|
`image`
|
`!i`
|
|
`image`
|
`!i`
|
|
`ducky`
|
`!`
|
|
`ducky`
|
`!`
|
### Custom search engines
### Custom search engines
If you want to add other search contexts to the plugin, you can use the
If you want to add other search contexts to the plugin, you can use the
`$ZSH_WEB_SEARCH_ENGINES`
variable.
`$ZSH_WEB_SEARCH_ENGINES`
variable. Set it before Oh My Zsh is sourced,
Set it before Oh My Zsh is sourced, with the following format:
with the following format:
```
zsh
```
zsh
ZSH_WEB_SEARCH_ENGINES
=(
ZSH_WEB_SEARCH_ENGINES
=(
...
@@ -69,13 +68,12 @@ 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
where
`<context>`
is the name of the search context, and
`<URL>`
a URL of the same type as the search contexts
the same type as the search contexts above. For example, to add
`reddit`
,
above. For example, to add
`reddit`
, you'd do:
you'd do:
```
zsh
```
zsh
ZSH_WEB_SEARCH_ENGINES
=(
reddit
"https://www.reddit.com/search/?q="
)
ZSH_WEB_SEARCH_ENGINES
=(
reddit
"https://www.reddit.com/search/?q="
)
```
```
These custom search engines will also be turned to aliases, so you can
These custom search engines will also be turned to aliases, so you can
both do
`web_search reddit <query>`
or
both do
`web_search reddit <query>`
or
`reddit <query>`
.
`reddit <query>`
.
plugins/web-search/web-search.plugin.zsh
View file @
c91684bb
...
@@ -72,7 +72,6 @@ alias youtube='web_search youtube'
...
@@ -72,7 +72,6 @@ alias youtube='web_search youtube'
#add your own !bang searches here
#add your own !bang searches here
alias
wiki
=
'web_search duckduckgo \!w'
alias
wiki
=
'web_search duckduckgo \!w'
alias
news
=
'web_search duckduckgo \!n'
alias
news
=
'web_search duckduckgo \!n'
#alias youtube='web_search duckduckgo \!yt'
alias
map
=
'web_search duckduckgo \!m'
alias
map
=
'web_search duckduckgo \!m'
alias
image
=
'web_search duckduckgo \!i'
alias
image
=
'web_search duckduckgo \!i'
alias
ducky
=
'web_search duckduckgo \!'
alias
ducky
=
'web_search duckduckgo \!'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment