Coder Social home page Coder Social logo

search-on-terminal's Introduction

在终端唤起web搜索

使用方法:

一、下载文件:

下载search_on_terminal.sh文件到任意位置,比如我放在:

~/tools/search_on_terminal.sh

二、加入自定义命令:

修改shell配置文件,通过alias加入自定义命令;例如,我用的zsh,则在~/.zshrc中添加配置:

alias s='sh ~/tools/search_on_terminal.sh'

其他shell环境配置文件目录所在位置为:

# zsh
~/.zshrc 		

# MAC
/etc/bashrc 	

# Linux
~/.bashrc 		

三、重启终端,即可使用:

$ s -[opt] [search word] # 如果没有[opt],默认使用谷歌香港搜索

参数说明:

-[opt] : 搜索方式,默认使用谷歌香港搜索
	-w : 直接打开网站
	-b : 使用百度搜索
	-g : 使用谷歌搜索
	-l : 搜索shell命令
	-git : 使用github搜索仓库
[search word] : 搜索词,可以通过空格隔开

例如:

# 打开http://weibo.com
$ s -w weibo.com 	

# 使用百度搜索“***”
$ s -b *** 		

# 使用谷歌香港搜索“***”
$ s -g ***		

# 使用http://linux.51yip.com/search/ 搜索“find”命令的使用方法
$ s -l find		

# 使用github搜索node
$ s -git node		

search-on-terminal's People

Contributors

xiongwilee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.