summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <hello@mcornella.com>2021-09-02 12:29:04 +0200
committerMarc Cornellà <hello@mcornella.com>2021-09-02 12:29:04 +0200
commit21b385e7bd522983642b52b51db5d4a210a77717 (patch)
tree236e68a583a9352d5c117fc4653a8a8854190f1d
parent190325049ef93731ab28295dbedf36d44ab33d7a (diff)
downloadzsh-21b385e7bd522983642b52b51db5d4a210a77717.tar.gz
zsh-21b385e7bd522983642b52b51db5d4a210a77717.tar.bz2
zsh-21b385e7bd522983642b52b51db5d4a210a77717.zip
fix(frontend-search): fix codepen.io search (#10157)
Fixes #10157
-rw-r--r--plugins/frontend-search/frontend-search.plugin.zsh14
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh
index 4517e21a8..437e477b9 100644
--- a/plugins/frontend-search/frontend-search.plugin.zsh
+++ b/plugins/frontend-search/frontend-search.plugin.zsh
@@ -29,14 +29,10 @@ alias unheap='frontend unheap'
alias vuejs='frontend vuejs'
function _frontend_fallback() {
- local url
- if [[ "$FRONTEND_SEARCH_FALLBACK" == duckduckgo ]]; then
- url="https://duckduckgo.com/?sites=$1&q="
- else
- url="https://google.com/search?as_sitesearch=$1&as_q="
- fi
-
- echo "$url"
+ case "$FRONTEND_SEARCH_FALLBACK" in
+ duckduckgo) echo "https://duckduckgo.com/?sites=$1&q=" ;;
+ *) echo "https://google.com/search?as_sitesearch=$1&as_q=" ;;
+ esac
}
function frontend() {
@@ -51,7 +47,7 @@ function frontend() {
bootsnipp 'https://bootsnipp.com/search?q='
bundlephobia 'https://bundlephobia.com/result?p='
caniuse 'https://caniuse.com/#search='
- codepen 'https://codepen.io/search?q='
+ codepen 'https://codepen.io/search/pens?q='
compassdoc 'http://compass-style.org/search?q='
cssflow 'http://www.cssflow.com/search?q='
dartlang 'https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:'