Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuchunyang/web-search.el
Web search from Emacs and the terminal
https://github.com/xuchunyang/web-search.el
Last synced: about 1 month ago
JSON representation
Web search from Emacs and the terminal
- Host: GitHub
- URL: https://github.com/xuchunyang/web-search.el
- Owner: xuchunyang
- Created: 2017-08-15T18:10:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T06:03:05.000Z (over 5 years ago)
- Last Synced: 2024-10-16T01:45:55.132Z (3 months ago)
- Language: Emacs Lisp
- Size: 32.2 KB
- Stars: 17
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# web-search.el [![Build Status](https://travis-ci.org/xuchunyang/web-search.el.svg?branch=master)](https://travis-ci.org/xuchunyang/web-search.el) [![MELPA](https://melpa.org/packages/web-search-badge.svg)](https://melpa.org/#/web-search) [![MELPA Stable](https://stable.melpa.org/packages/web-search-badge.svg)](https://stable.melpa.org/#/web-search)
Web search from Emacs and the terminal. Open URL in your default web browser.
From Emacs, type `M-x web-search`.
From the terminal, use `web-search`:
```
$ web-search -h
Web search from the terminal.Usage: web-search [options]
Options:
-h, --help display help
-l, --list-providers list supported providers
--list-tags list available tags
-o, --output output only mode
-p, --provider string search provider (default "Google")
-t, --tag string search tag
-v, --verbose verbose mode
--version display version
--completion display completion code for Bash/Zsh```
# Examples
Search for puppies on google.
```
;; From Emacs
M-x web-search RET puppies RET# From the terminal
$ web-search puppies
```Search for rhinos on wikipedia
```
;; From Emacs
C-u M-x web-search RET Wikipedia RET rhinos RET# From the terminal
$ web-search -p wikipedia rhinos
```Search providers tagged "Code" for string-length.
```
;; From Emacs
C-u C-u M-x web-search RET Code RET string-length RET# From the terminal
$ web-search -t code string-length
```## Customization
See the user option `web-search-providers` and `web-search-default-provider`. To
customize the command line program `web-search`, you can put your configuration
into `$HOME/.config/web-search-config.el` or `$HOME/.web-search-config.el`, it
will be loaded *after* `web-search.el` has been loaded.For example, to change the default provider from Google to Bing:
```elisp
(setq web-search-default-provider "Bing")
```and to search something on [Emacs China](https://emacs-china.org/):
```elisp
(push '("Emacs China" "https://emacs-china.org/search?q=%s")
web-search-providers)
```## Bash/Zsh Completion
Put the following line to your Bash or Zsh configuration file such as `~/.bashrc`
or `~/.zshrc`.```sh
eval "$(web-search --completion)"
```## Supported Providers
* 500px
* Arch Package
* Arch Wiki
* Bandcamp
* Bing
* Debian Manpages
* Debian Package
* DuckDuckGo
* Gist
* GitHub
* Hacker News
* MacPorts
* RubyGems
* Soundcloud
* Stack Overflow
* Wikipedia
* YouTube
* Zhihu## Acknowledgment
This project is inspired by https://github.com/zquestz/s.