From eea77b7cb7a8d64a03d7eddc5e0f05e122b82546 Mon Sep 17 00:00:00 2001 From: Will Mendes Date: Sat, 18 Apr 2015 20:59:13 -0300 Subject: Add stackoverflow link --- plugins/frontend-search/frontend-search.plugin.zsh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'plugins/frontend-search/frontend-search.plugin.zsh') diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index f1d45b0d1..c9e51b2e0 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -17,7 +17,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)' ]]; + if [[ ! $1 =~ '(jquery|mdn|compass|html5please|caniuse|aurajs|dartlang|qunit|fontello|bootsnipp|cssflow|codepen|unheap|bem|smacss|angularjs|reactjs|emberjs|stackoverflow)' ]]; then echo "Search valid search content $1 not supported." echo "Valid contents: (formats 'frontend ' or '')" @@ -40,6 +40,7 @@ function frontend() { echo "* angularjs" echo "* reactjs" echo "* emberjs" + echo "* stackoverflow" echo "" return 1 @@ -103,6 +104,9 @@ function frontend() { "emberjs") url="${url}emberjs.com" url="${url}/api/#stq=$2&stp=1" ;; + "stackoverflow") + url="${url}https://stackoverflow.com" + url="${url}/search?q=$2" ;; *) echo "INVALID PARAM!" return ;; esac @@ -149,3 +153,6 @@ alias smacss='frontend smacss' alias angularjs='frontend angularjs' alias reactjs='frontend reactjs' alias emberjs='frontend emberjs' + +# search websites +alias stackoverflow='frontend stackoverflow' -- cgit v1.2.3-70-g09d2