Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Anant-mishra1729/web-search
Standalone plugin for web search in zsh
https://github.com/Anant-mishra1729/web-search
Last synced: about 2 months ago
JSON representation
Standalone plugin for web search in zsh
- Host: GitHub
- URL: https://github.com/Anant-mishra1729/web-search
- Owner: Anant-mishra1729
- License: mit
- Created: 2023-05-03T19:02:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-12T17:22:49.000Z (about 1 year ago)
- Last Synced: 2024-04-11T15:03:45.858Z (about 2 months ago)
- Language: Shell
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Lists
- awesome-zsh-plugins - web-search (anant-mishra1729) - Adds aliases for searching with Google, Bing, Wiki, YouTube, Yahoo, Duck Duck Go, GitHub, Stack Overflow and other services straight from the command line. (Plugins / ZSH on Windows)
README
# web-search plugin
**This is a standalone plugin for zsh with no need of installing Oh-my-zsh**Open your `~/.zshrc` file and add this line `source < Path where web-search.plugin.zsh file is located >`
For example
```zsh
source ~/.config/zsh/web-search/web-search.plugin.zsh
```## Usage
This plugin adds aliases for searching with Google, Wiki, Bing, YouTube and other popular services.You can use the `web-search` plugin in these two forms:
* `web_search [more terms if you want]`
* ` [more terms if you want]`For example, these two are equivalent:
```zsh
$ web_search google oh-my-zsh
$ 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` or `wa`| `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=` |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 engines add this to your `.zshrc`:
```zsh
export ZSH_WEB_SEARCH_ENGINES=(
...
)
```where `` is the name of the search context, and `` a URL of
the same type as the search contexts above. For example, to add `reddit`,
you'd do:```zsh
export 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 ` or `reddit `.