From 06dfc56bedc2e326d814dd44819f41c24f266050 Mon Sep 17 00:00:00 2001 From: Will Mendes Date: Sat, 11 Mar 2017 11:33:55 +1100 Subject: [PATCH] feat(angular): adding angular.io search --- plugins/frontend-search/README.md | 1 + plugins/frontend-search/_frontend-search.sh | 3 ++- plugins/frontend-search/frontend-search.plugin.zsh | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index 4d956e38..dc578f3c 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -32,6 +32,7 @@ Available search contexts are: | context | URL | |---------------|--------------------------------------------------------------------------| +| angular | `https://angular.io/docs/ts/latest/api/#!?query=` | | 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=` | diff --git a/plugins/frontend-search/_frontend-search.sh b/plugins/frontend-search/_frontend-search.sh index 9aad76f7..00a73dc5 100644 --- a/plugins/frontend-search/_frontend-search.sh +++ b/plugins/frontend-search/_frontend-search.sh @@ -33,7 +33,8 @@ function _frontend() { 'unheap: Search in unheap website' 'bem: Search in BEM website' 'smacss: Search in SMACSS website' - 'angularjs: Search in Angular website' + 'angular: Search in Angular.io website' + 'angularjs: Search in docs.angularjs.org website' 'reactjs: Search in React website' 'emberjs: Search in Ember website' 'stackoverflow: Search in StackOverflow website' diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index 3fd49ab8..f53e37f6 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -1,3 +1,4 @@ +alias angular='frontend angular' alias angularjs='frontend angularjs' alias aurajs='frontend aurajs' alias bem='frontend bem' @@ -26,6 +27,7 @@ function frontend() { # define search context URLS typeset -A urls urls=( + angular 'https://angular.io/docs/ts/latest/api/#!?query=' 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=' @@ -57,7 +59,7 @@ function frontend() { print -P "%Uterm%u and what follows is what will be searched for in the %Ucontext%u website," print -P "and %Ucontext%u is one of the following:" print -P "" - print -P " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow," + print -P " angular, angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow," print -P " dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs," print -P " qunit, reactjs, smacss, stackoverflow, unheap" print -P "" @@ -73,7 +75,7 @@ function frontend() { echo "" echo "Valid contexts are:" echo "" - echo " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow, " + echo " angular, angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow, " echo " dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs, " echo " qunit, reactjs, smacss, stackoverflow, unheap" echo ""