diff options
author | Will Mendes <willmendesneto@gmail.com> | 2015-08-29 11:48:28 -0300 |
---|---|---|
committer | Will Mendes <willmendesneto@gmail.com> | 2015-08-29 11:48:28 -0300 |
commit | 0a80889848ccb3ada94dd2fdb793a01a268f7a16 (patch) | |
tree | e38b4afada1c4a0371fcb235edd00c1e4ea31404 /plugins/frontend-search/frontend-search.plugin.zsh | |
parent | 192de6bcffb0294e19f4203f6f7dc1a7f3e427be (diff) | |
download | zsh-0a80889848ccb3ada94dd2fdb793a01a268f7a16.tar.gz zsh-0a80889848ccb3ada94dd2fdb793a01a268f7a16.tar.bz2 zsh-0a80889848ccb3ada94dd2fdb793a01a268f7a16.zip |
Frontend-search: add search in npm website
Diffstat (limited to 'plugins/frontend-search/frontend-search.plugin.zsh')
-rw-r--r-- | plugins/frontend-search/frontend-search.plugin.zsh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index f7485621b..e47735a60 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -9,7 +9,7 @@ function frontend() { fi # check whether the search engine is supported - if [[ ! $1 =~ '(jquery|mdn|compass|html5please|caniuse|aurajs|dartlang|qunit|fontello|bootsnipp|cssflow|codepen|unheap|bem|smacss|angularjs|reactjs|emberjs|stackoverflow)' ]]; + if [[ ! $1 =~ '(jquery|mdn|compass|html5please|caniuse|aurajs|dartlang|qunit|fontello|bootsnipp|cssflow|codepen|unheap|bem|smacss|angularjs|reactjs|emberjs|stackoverflow|npmjs)' ]]; then echo "Search valid search content $1 not supported." echo "Valid contents: (formats 'frontend <search-content>' or '<search-content>')" @@ -33,6 +33,7 @@ function frontend() { echo "* reactjs" echo "* emberjs" echo "* stackoverflow" + echo "* npmjs" echo "" return 1 @@ -99,6 +100,9 @@ function frontend() { "stackoverflow") url="${url}stackoverflow.com" url="${url}/search?q=$2" ;; + "npmjs") + url="${url}www.npmjs.com" + url="${url}/search?q=$2" ;; *) echo "INVALID PARAM!" return ;; esac @@ -148,3 +152,4 @@ alias emberjs='frontend emberjs' # search websites alias stackoverflow='frontend stackoverflow' +alias npmjs='frontend npmjs' |