diff options
| author | Chris McCuller <cmcculler@salesforce.com> | 2015-09-21 22:19:15 -0400 | 
|---|---|---|
| committer | Chris McCuller <cmcculler@salesforce.com> | 2015-09-21 22:19:15 -0400 | 
| commit | e6ccd37b0563b4e7b34c41034766b9789e43ee5c (patch) | |
| tree | c12c8c2c6437fd7d5d3ec5bff27634a80759b808 /plugins/web-search | |
| parent | 30ef85664822595e29acdbc840c45d5772d84b5d (diff) | |
| parent | 76a26a2a59d8c6d0f65a4426cdb93920e255aea7 (diff) | |
| download | zsh-e6ccd37b0563b4e7b34c41034766b9789e43ee5c.tar.gz zsh-e6ccd37b0563b4e7b34c41034766b9789e43ee5c.tar.bz2 zsh-e6ccd37b0563b4e7b34c41034766b9789e43ee5c.zip  | |
Merge master (rebase being super annoying). Fix conflicts
Diffstat (limited to 'plugins/web-search')
| -rw-r--r-- | plugins/web-search/web-search.plugin.zsh | 14 | 
1 files changed, 3 insertions, 11 deletions
diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index d407edb96..369a0e680 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -12,18 +12,9 @@ function web_search() {      duckduckgo  "https://www.duckduckgo.com/?q="      yandex      "https://yandex.ru/yandsearch?text="      github      "https://github.com/search?q=" +    baidu       "https://www.baidu.com/s?wd="    ) -  # define the open command -  case "$OSTYPE" in -    darwin*)  open_cmd="open" ;; -    cygwin*)  open_cmd="cygstart" ;; -    linux*)   open_cmd="xdg-open" ;; -    *)        echo "Platform $OSTYPE not supported" -              return 1 -              ;; -  esac -    # check whether the search engine is supported    if [[ -z "$urls[$1]" ]]; then      echo "Search engine $1 not supported." @@ -41,7 +32,7 @@ function web_search() {      url="${(j://:)${(s:/:)urls[$1]}[1,2]}"    fi -  nohup $open_cmd "$url" &>/dev/null +  open_command "$url"  } @@ -51,6 +42,7 @@ alias yahoo='web_search yahoo'  alias ddg='web_search duckduckgo'  alias yandex='web_search yandex'  alias github='web_search github' +alias baidu='web_search baidu'  #add your own !bang searches here  alias wiki='web_search duckduckgo \!w'  | 
