summaryrefslogtreecommitdiff
path: root/plugins/frontend-search
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2020-05-29 11:01:03 -0600
committerTuowen Zhao <ztuowen@gmail.com>2020-05-29 11:01:03 -0600
commita3be2e4084285d7625e63bfe4b951c58143e3c9c (patch)
treea018be4daef44a51b91477f38da514867659c7d6 /plugins/frontend-search
parent191e14cc7f63c4525a0f66d571416faf9e91a185 (diff)
parent93cc3964e2d265ab0571298d69d2eed0a65d13f2 (diff)
downloadzsh-a3be2e4084285d7625e63bfe4b951c58143e3c9c.tar.gz
zsh-a3be2e4084285d7625e63bfe4b951c58143e3c9c.tar.bz2
zsh-a3be2e4084285d7625e63bfe4b951c58143e3c9c.zip
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
Diffstat (limited to 'plugins/frontend-search')
-rw-r--r--plugins/frontend-search/README.md1
-rw-r--r--plugins/frontend-search/_frontend-search.sh4
-rw-r--r--plugins/frontend-search/frontend-search.plugin.zsh6
3 files changed, 9 insertions, 2 deletions
diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md
index ddcb3d72b..050058931 100644
--- a/plugins/frontend-search/README.md
+++ b/plugins/frontend-search/README.md
@@ -52,6 +52,7 @@ Available search contexts are:
| mdn | `https://developer.mozilla.org/search?q=` |
| nodejs | `https://www.google.com/search?as_sitesearch=nodejs.org/en/docs/&as_q=` |
| npmjs | `https://www.npmjs.com/search?q=` |
+| packagephobia | `https://packagephobia.now.sh/result?p=` |
| 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=` |
diff --git a/plugins/frontend-search/_frontend-search.sh b/plugins/frontend-search/_frontend-search.sh
index c59640e74..15f8d239d 100644
--- a/plugins/frontend-search/_frontend-search.sh
+++ b/plugins/frontend-search/_frontend-search.sh
@@ -38,6 +38,7 @@ function _frontend() {
'mdn: Search in MDN website'
'nodejs: Search in NodeJS website'
'npmjs: Search in NPMJS website'
+ 'packagephobia: Search in Packagephobia website'
'qunit: Search in Qunit website'
'reactjs: Search in React website'
'smacss: Search in SMACSS website'
@@ -124,6 +125,9 @@ function _frontend() {
bundlephobia)
_describe -t points "Warp points" frontend_points && ret=0
;;
+ packagephobia)
+ _describe -t points "Warp points" frontend_points && ret=0
+ ;;
flowtype)
_describe -t points "Warp points" frontend_points && ret=0
;;
diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh
index ed19280c4..4517e21a8 100644
--- a/plugins/frontend-search/frontend-search.plugin.zsh
+++ b/plugins/frontend-search/frontend-search.plugin.zsh
@@ -19,6 +19,7 @@ alias lodash='frontend lodash'
alias mdn='frontend mdn'
alias nodejs='frontend nodejs'
alias npmjs='frontend npmjs'
+alias packagephobia='frontend packagephobia'
alias qunit='frontend qunit'
alias reactjs='frontend reactjs'
alias smacss='frontend smacss'
@@ -65,6 +66,7 @@ function frontend() {
mdn 'https://developer.mozilla.org/search?q='
nodejs $(_frontend_fallback 'nodejs.org/en/docs/')
npmjs 'https://www.npmjs.com/search?q='
+ packagephobia 'https://packagephobia.now.sh/result?p='
qunit 'https://api.qunitjs.com/?s='
reactjs $(_frontend_fallback 'reactjs.org/')
smacss $(_frontend_fallback 'smacss.com')
@@ -82,7 +84,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 " angular, angularjs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow,"
+ print -P " angular, angularjs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow, packagephobia"
print -P " dartlang, emberjs, fontello, flowtype, github, html5please, jestjs, jquery, lodash,"
print -P " mdn, npmjs, nodejs, qunit, reactjs, smacss, stackoverflow, unheap, vuejs, bundlephobia"
print -P ""
@@ -98,7 +100,7 @@ function frontend() {
echo ""
echo "Valid contexts are:"
echo ""
- echo " angular, angularjs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow,"
+ echo " angular, angularjs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow, packagephobia"
echo " dartlang, emberjs, fontello, github, html5please, jest, jquery, lodash,"
echo " mdn, npmjs, nodejs, qunit, reactjs, smacss, stackoverflow, unheap, vuejs, bundlephobia"
echo ""