Commit 18ef1ee6 authored by Dawid Ferenczy's avatar Dawid Ferenczy
Browse files

Merge remote-tracking branch 'robbyrussell/master'

parents eafd5f32 192de6bc
## Rationale ##
> Searches for your Frontend contents more easier
## Instalation ##
Open your `.zshrc` file and load `frontend-search` plugin
```bash
...
plugins=( <your-plugins-list>... frontend-search)
...
```
## Commands ##
All command searches are accept only in format
* `frontend <search-content> <search-term>`
The search content are
* `jquery <api.jquery.com>`
* `mdn <developer.mozilla.org>`
* `compass <compass-style.org>`
* `html5please <html5please.com>`
* `caniuse <caniuse.com>`
* `aurajs <aurajs.com>`
* `dartlang <api.dartlang.org/apidocs/channels/stable/dartdoc-viewer>`
* `lodash <search>`
* `qunit <api.qunitjs.com>`
* `fontello <fontello.com>`
* `bootsnipp <bootsnipp.com>`
* `cssflow <cssflow.com>`
* `codepen <codepen.io>`
* `unheap <www.unheap.com>`
* `bem <google.com/search?as_q=<search-term>&as_sitesearch=bem.info>`
* `smacss <google.com/search?as_q=<search-term>&as_sitesearch=smacss.com>`
* `angularjs <google.com/search?as_q=<search-term>&as_sitesearch=angularjs.org>`
* `reactjs <google.com/search?as_q=<search-term>&as_sitesearch=facebook.github.io/react>`
* `emberjs <emberjs.com>`
* `stackoverflow <stackoverflow.com>`
## 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`
## Author
**Wilson Mendes (willmendesneto)**
+ <https://plus.google.com/+WilsonMendes>
+ <https://twitter.com/willmendesneto>
+ <http://github.com/willmendesneto>
New features comming soon.
#compdef frontend
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion::complete:frontend:*:commands' group-name commands
zstyle ':completion::complete:frontend:*:frontend_points' group-name frontend_points
zstyle ':completion::complete:frontend::' list-grouped
zmodload zsh/mapfile
function _frontend() {
local CONFIG=$HOME/.frontend-search
local ret=1
local -a commands
local -a frontend_points
frontend_points=( "${(f)mapfile[$CONFIG]//$HOME/~}" )
commands=(
'jquery: Search in jQuery website'
'mdn: Search in MDN website'
'compass: Search in COMPASS website'
'html5please: Search in HTML5 Please website'
'caniuse: Search in Can I Use website'
'aurajs: Search in AuraJs website'
'dartlang: Search in Dart website'
'lodash: Search in Lo-Dash website'
'qunit: Search in Qunit website'
'fontello: Search in fontello website'
'bootsnipp: Search in bootsnipp website'
'cssflow: Search in cssflow website'
'codepen: Search in codepen website'
'unheap: Search in unheap website'
'bem: Search in BEM website'
'smacss: Search in SMACSS website'
'angularjs: Search in Angular website'
'reactjs: Search in React website'
'emberjs: Search in Ember website'
'stackoverflow: Search in StackOverflow website'
)
_arguments -C \
'1: :->first_arg' \
'2: :->second_arg' && ret=0
case $state in
first_arg)
_describe -t frontend_points "Warp points" frontend_points && ret=0
_describe -t commands "Commands" commands && ret=0
;;
second_arg)
case $words[2] in
jquery)
_describe -t points "Warp points" frontend_points && ret=0
;;
mdn)
_describe -t points "Warp points" frontend_points && ret=0
;;
compass)
_describe -t points "Warp points" frontend_points && ret=0
;;
html5please)
_describe -t points "Warp points" frontend_points && ret=0
;;
caniuse)
_describe -t points "Warp points" frontend_points && ret=0
;;
aurajs)
_describe -t points "Warp points" frontend_points && ret=0
;;
dartlang)
_describe -t points "Warp points" frontend_points && ret=0
;;
lodash)
_describe -t points "Warp points" frontend_points && ret=0
;;
qunit)
_describe -t points "Warp points" frontend_points && ret=0
;;
fontello)
_describe -t points "Warp points" frontend_points && ret=0
;;
bootsnipp)
_describe -t points "Warp points" frontend_points && ret=0
;;
cssflow)
_describe -t points "Warp points" frontend_points && ret=0
;;
codepen)
_describe -t points "Warp points" frontend_points && ret=0
;;
unheap)
_describe -t points "Warp points" frontend_points && ret=0
;;
bem)
_describe -t points "Warp points" frontend_points && ret=0
;;
smacss)
_describe -t points "Warp points" frontend_points && ret=0
;;
angularjs)
_describe -t points "Warp points" frontend_points && ret=0
;;
reactjs)
_describe -t points "Warp points" frontend_points && ret=0
;;
emberjs)
_describe -t points "Warp points" frontend_points && ret=0
;;
stackoverflow)
_describe -t points "Warp points" frontend_points && ret=0
;;
esac
;;
esac
return $ret
}
_frontend "$@"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et
This diff is collapsed.
...@@ -59,6 +59,8 @@ case "$words[1]" in ...@@ -59,6 +59,8 @@ case "$words[1]" in
build) build)
_files -g "*.gemspec" _files -g "*.gemspec"
;; ;;
install)
_files ;;
list) list)
if [[ "$state" == forms ]]; then if [[ "$state" == forms ]]; then
_gem_installed _gem_installed
......
This diff is collapsed.
This diff is collapsed.
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
# http://github.com/olivierverdier/zsh-git-prompt # http://github.com/olivierverdier/zsh-git-prompt
# #
export __GIT_PROMPT_DIR=$ZSH/plugins/git-prompt export __GIT_PROMPT_DIR=$ZSH/plugins/git-prompt
# Initialize colors.
autoload -U colors
colors
# Allow for functions in the prompt. # Allow for functions in the prompt.
setopt PROMPT_SUBST setopt PROMPT_SUBST
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File mode changed from 100755 to 100644
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment