Skip to content

chrisemoulton/s

 
 

Repository files navigation

License ReportCard Build Release

s

Web search from the terminal. Just opens your default browser.

Usage:
  s <query> [flags]

Flags:
  -b, --binary string     binary to launch search uri
  -l, --list-providers    list supported providers
  -p, --provider string   set search provider (default "google")
  -v, --verbose           display url when opening
      --version           display version

Install

go get -v github.com/zquestz/s
cd $GOPATH/src/github.com/zquestz/s
make
make install

Examples

Search for puppies on google.

s puppies

Search for a wifi router on amazon

s -p amazon wifi router

Search for rhinos on wikipedia

s -p wikipedia rhinos

Provider Expansion

We can do partial matching of provider names. This searches Facebook for hamsters.

s -p fa hamsters

Or toasters on amazon.

s -p am toasters

Provider Autocompletion

Autocompletion for providers is supported. For setting up autocompletion:

  1. Have s installed
  2. Add the following lines to ~/.bash_profile or ~/.zshrc
if [ -f $GOPATH/src/github.com/zquestz/s/autocomplete/s-completion.bash ]; then
    . $GOPATH/src/github.com/zquestz/s/autocomplete/s-completion.bash
fi

Now you are good to go.

s -p ba<TAB><TAB>
baidu     bandcamp

Advanced

Setup an alias in your .profile for your favorite providers.

alias sa="s -p amazon"
alias sw="s -p wikipedia"

Use w3m to find cats instead of just your default browser.

s -b w3m cats

Search for conspiracy theories in incognito mode.

s -b "chromium --incognito" conspiracy theories
s -b "firefox --private-window" conspiracy theories

Search in a specific subreddit.

s -p reddit /r/cscareerquestions best startups.

Supported Providers

  • 500px
  • 8tracks
  • amazon
  • arxiv
  • atmospherejs
  • baidu
  • bandcamp
  • bing
  • codepen
  • coursera
  • cplusplus
  • crunchyroll
  • digg
  • dockerhub
  • dribbble
  • duckduckgo
  • dumpert
  • facebook
  • flickr
  • flipkart
  • foursquare
  • gist
  • github
  • gmail
  • go
  • godoc
  • google
  • hackernews
  • ietf
  • ifttt
  • imdb
  • imgur
  • inbox
  • instagram
  • kickasstorrents
  • libgen
  • linkedin
  • lmgtfy
  • macports
  • mdn
  • msdn
  • naver
  • nhaccuatui
  • npm
  • npmsearch
  • nvd
  • packagist
  • php
  • pinterest
  • python
  • quora
  • reddit
  • rubygems
  • soundcloud
  • spotify
  • stackoverflow
  • steam
  • taobao
  • thepiratebay
  • torrentz
  • twitchtv
  • twitter
  • unity3d
  • upcloud
  • vimeo
  • wikipedia
  • wolframalpha
  • yahoo
  • yandex
  • youtube

Contributors

License

s is released under the MIT license.

About

Open a web search in your terminal.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.1%
  • Shell 1.7%
  • Makefile 0.2%