mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-28 18:53:29 +01:00
feat(web-search): add support for Brave search engine (#11106)
This commit is contained in:
parent
b9be3a43b4
commit
52e848ce8f
@ -25,9 +25,10 @@ $ 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=` |
|
||||||
| `yahoo` | `https://search.yahoo.com/search?p=` |
|
| `yahoo` | `https://search.yahoo.com/search?p=` |
|
||||||
| `ddg` or `duckduckgo` | `https://www.duckduckgo.com/?q=` |
|
| `ddg` or `duckduckgo` | `https://www.duckduckgo.com/?q=` |
|
||||||
| `sp` or `startpage` | `https://www.startpage.com/do/search?q=` |
|
| `sp` or `startpage` | `https://www.startpage.com/do/search?q=` |
|
||||||
|
@ -7,22 +7,23 @@ function web_search() {
|
|||||||
typeset -A urls
|
typeset -A urls
|
||||||
urls=(
|
urls=(
|
||||||
$ZSH_WEB_SEARCH_ENGINES
|
$ZSH_WEB_SEARCH_ENGINES
|
||||||
google "https://www.google.com/search?q="
|
google "https://www.google.com/search?q="
|
||||||
bing "https://www.bing.com/search?q="
|
bing "https://www.bing.com/search?q="
|
||||||
yahoo "https://search.yahoo.com/search?p="
|
brave "https://search.brave.com/search?q="
|
||||||
duckduckgo "https://www.duckduckgo.com/?q="
|
yahoo "https://search.yahoo.com/search?p="
|
||||||
startpage "https://www.startpage.com/do/search?q="
|
duckduckgo "https://www.duckduckgo.com/?q="
|
||||||
yandex "https://yandex.ru/yandsearch?text="
|
startpage "https://www.startpage.com/do/search?q="
|
||||||
github "https://github.com/search?q="
|
yandex "https://yandex.ru/yandsearch?text="
|
||||||
baidu "https://www.baidu.com/s?wd="
|
github "https://github.com/search?q="
|
||||||
ecosia "https://www.ecosia.org/search?q="
|
baidu "https://www.baidu.com/s?wd="
|
||||||
goodreads "https://www.goodreads.com/search?q="
|
ecosia "https://www.ecosia.org/search?q="
|
||||||
qwant "https://www.qwant.com/?q="
|
goodreads "https://www.goodreads.com/search?q="
|
||||||
givero "https://www.givero.com/search?q="
|
qwant "https://www.qwant.com/?q="
|
||||||
stackoverflow "https://stackoverflow.com/search?q="
|
givero "https://www.givero.com/search?q="
|
||||||
wolframalpha "https://www.wolframalpha.com/input/?i="
|
stackoverflow "https://stackoverflow.com/search?q="
|
||||||
archive "https://web.archive.org/web/*/"
|
wolframalpha "https://www.wolframalpha.com/input/?i="
|
||||||
scholar "https://scholar.google.com/scholar?q="
|
archive "https://web.archive.org/web/*/"
|
||||||
|
scholar "https://scholar.google.com/scholar?q="
|
||||||
)
|
)
|
||||||
|
|
||||||
# check whether the search engine is supported
|
# check whether the search engine is supported
|
||||||
@ -47,6 +48,7 @@ function web_search() {
|
|||||||
|
|
||||||
|
|
||||||
alias bing='web_search bing'
|
alias bing='web_search bing'
|
||||||
|
alias brs='web_search brave'
|
||||||
alias google='web_search google'
|
alias google='web_search google'
|
||||||
alias yahoo='web_search yahoo'
|
alias yahoo='web_search yahoo'
|
||||||
alias ddg='web_search duckduckgo'
|
alias ddg='web_search duckduckgo'
|
||||||
|
Loading…
Reference in New Issue
Block a user