From 0a80889848ccb3ada94dd2fdb793a01a268f7a16 Mon Sep 17 00:00:00 2001 From: Will Mendes Date: Sat, 29 Aug 2015 11:48:28 -0300 Subject: Frontend-search: add search in npm website --- plugins/frontend-search/README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/frontend-search/README.md') diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index 801d450f3..b8e96ea4a 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -43,6 +43,7 @@ The search content are * `reactjs &as_sitesearch=facebook.github.io/react>` * `emberjs ` * `stackoverflow ` +* `npmjs ` ## Aliases ## @@ -69,6 +70,7 @@ There are a few aliases presented as well: * `reactjs` A shorthand for `frontend reactjs` * `emberjs` A shorthand for `frontend emberjs` * `stackoverflow` A shorthand for `frontend stackoverflow` +* `npmjs` A shorthand for `frontend npmjs` ## Author -- cgit v1.2.3-70-g09d2 From ff706f3ef8fd632d93e2c347d32c62f15b17c25c Mon Sep 17 00:00:00 2001 From: willmendesneto Date: Thu, 3 Jul 2014 22:53:00 -0300 Subject: Add "help" method in "frontend-search" plugin --- plugins/frontend-search/README.md | 9 +++++++- plugins/frontend-search/frontend-search.plugin.zsh | 26 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) (limited to 'plugins/frontend-search/README.md') diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index b8e96ea4a..bf8a4bc08 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -17,9 +17,16 @@ plugins=( ... frontend-search) ## Commands ## -All command searches are accept only in format +All command searches are accept only in formats * `frontend ` +* ` ` + +For more informations, please run help command (are similars) + +* `frontend -h` +* `frontend --help` +* `frontend help` The search content are diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index 3afc3336d..08930ddcd 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -29,14 +29,36 @@ function frontend() { unheap 'http://www.unheap.com/?s=' ) + # show help for commands list + if [[ $1 =~ '(help|--help|-h)' ]] + then + echo "Usage:" + echo "\n\tfrontend \n\t\n\tfrontend " + echo "" + echo "Where is one of:" + echo "jquery, mdn, compass, html5please, caniuse, aurajs, dartlang, qunit, fontello," + echo "bootsnipp, cssflow, codepen, unheap, bem, smacss, angularjs, reactjs, emberjs" + echo "help" + echo "" + echo "Where is a term to search in allowed repositories" + echo "" + echo "frontend --help show plugin help" + echo "frontend -h show plugin help" + echo "" + echo "It is allowed to directly access all search contents." + echo "" + return 1 + fi + # no keyword provided, simply show how call methods - if [[ $# -le 1 ]]; then + if [[ $# -le 1 ]] + then echo "Please provide a search-content and a search-term for app.\nEx:\nfrontend \n" return 1 fi # check whether the search engine is supported - if [[ -z "$urls[$1]" ]]; then + if [[ -z "$urls[$1]" ]] then echo "Search valid search content $1 not supported." echo "Valid contents: (formats 'frontend ' or '')" -- cgit v1.2.3-70-g09d2 From c481c62bc996cfe22417621dfd96c4267eb1e740 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 31 Aug 2015 19:17:16 +0200 Subject: Refactor and clear up README file --- plugins/frontend-search/README.md | 121 +++++++++++++++----------------------- 1 file changed, 48 insertions(+), 73 deletions(-) (limited to 'plugins/frontend-search/README.md') diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index bf8a4bc08..d0bc5589f 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -1,83 +1,60 @@ -## Rationale ## +## Introduction ## -> Searches for your Frontend contents more easier +> Searches for your frontend web development made easier -## Instalation ## +## Installation ## +Open your `~/.zshrc` file and enable the `frontend-search` plugin: -Open your `.zshrc` file and load `frontend-search` plugin +```zsh + +plugins=( ... frontend-search) -```bash -... -plugins=( ... frontend-search) -... ``` -## Commands ## - -All command searches are accept only in formats - -* `frontend ` -* ` ` - -For more informations, please run help command (are similars) - -* `frontend -h` -* `frontend --help` -* `frontend help` - -The search content are - -* `jquery ` -* `mdn ` -* `compass ` -* `html5please ` -* `caniuse ` -* `aurajs ` -* `dartlang ` -* `lodash ` -* `qunit ` -* `fontello ` -* `bootsnipp ` -* `cssflow ` -* `codepen ` -* `unheap ` -* `bem &as_sitesearch=bem.info>` -* `smacss &as_sitesearch=smacss.com>` -* `angularjs &as_sitesearch=angularjs.org>` -* `reactjs &as_sitesearch=facebook.github.io/react>` -* `emberjs ` -* `stackoverflow ` -* `npmjs ` - - -## Aliases ## - -There are a few aliases presented as well: - -* `jquery` A shorthand for `frontend jquery` -* `mdn` A shorthand for `frontend mdn` -* `compass` A shorthand for `frontend compass` -* `html5please` A shorthand for `frontend html5please` -* `caniuse` A shorthand for `frontend caniuse` -* `aurajs` A shorthand for `frontend aurajs` -* `dartlang` A shorthand for `frontend dartlang` -* `lodash` A shorthand for `frontend lodash` -* `qunit` A shorthand for `frontend qunit` -* `fontello` A shorthand for `frontend fontello` -* `bootsnipp` A shorthand for `frontend bootsnipp` -* `cssflow` A shorthand for `frontend cssflow` -* `codepen` A shorthand for `frontend codepen` -* `unheap` A shorthand for `frontend unheap` -* `bem` A shorthand for `frontend bem` -* `smacss` A shorthand for `frontend smacss` -* `angularjs` A shorthand for `frontend angularjs` -* `reactjs` A shorthand for `frontend reactjs` -* `emberjs` A shorthand for `frontend emberjs` -* `stackoverflow` A shorthand for `frontend stackoverflow` -* `npmjs` A shorthand for `frontend npmjs` +## Usage ## + +You can use the frontend-search plugin in these two forms: + +* `frontend [more terms if you want]` +* ` [more terms if you want]` + +For example, these two are equivalent: + +```zsh +$ frontend angularjs dependency injection +$ angularjs dependency injection +``` + +Available search contexts are: + +| context | URL | +|---------------|--------------------------------------------------------------------------| +| angularjs | `https://google.com/search?as_sitesearch=angularjs.org&as_q=` | +| aurajs | `http://aurajs.com/api/#stq=` | +| bem | `https://google.com/search?as_sitesearch=bem.info&as_q=` | +| bootsnipp | `http://bootsnipp.com/search?q=` | +| caniuse | `http://caniuse.com/#search=` | +| codepen | `http://codepen.io/search?q=` | +| compass | `http://compass-style.org/search?q=` | +| cssflow | `http://www.cssflow.com/search?q=` | +| dartlang | `https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:` | +| emberjs | `http://emberjs.com/api/#stp=1&stq=` | +| fontello | `http://fontello.com/#search=` | +| html5please | `http://html5please.com/#` | +| jquery | `https://api.jquery.com/?s=` | +| lodash | `https://devdocs.io/lodash/index#` | +| mdn | `https://developer.mozilla.org/search?q=` | +| npmjs | `https://www.npmjs.com/search?q=` | +| qunit | `https://api.qunitjs.com/?s=` | +| reactjs | `https://google.com/search?as_sitesearch=facebook.github.io/react&as_q=` | +| smacss | `https://google.com/search?as_sitesearch=smacss.com&as_q=` | +| stackoverflow | `http://stackoverflow.com/search?q=` | +| unheap | `http://www.unheap.com/?s=` | + +If you want to have another context, open an Issue and tell us! ## Author @@ -86,5 +63,3 @@ There are a few aliases presented as well: + + + - -New features comming soon. -- cgit v1.2.3-70-g09d2