mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
feat(frontend-search): add I am lucky option
This commit is contained in:
parent
c37df3ebd4
commit
346bd1cd53
2 changed files with 20 additions and 5 deletions
|
|
@ -30,10 +30,16 @@ alias vuejs='frontend vuejs'
|
|||
alias nextjs='frontend nextjs'
|
||||
|
||||
function _frontend_fallback() {
|
||||
case "$FRONTEND_SEARCH_FALLBACK" in
|
||||
duckduckgo) echo "https://duckduckgo.com/?sites=$1&q=" ;;
|
||||
*) echo "https://google.com/search?as_sitesearch=$1&as_q=" ;;
|
||||
esac
|
||||
if [[ "$FRONTEND_SEARCH_FALLBACK_LUCKY" == "true" ]]; then
|
||||
case true in
|
||||
*) echo "https://duckduckgo.com/?q=!ducky+site%3A$1+" ;;
|
||||
esac
|
||||
else
|
||||
case "$FRONTEND_SEARCH_FALLBACK" in
|
||||
duckduckgo) echo "https://duckduckgo.com/?sites=$1&q=" ;;
|
||||
*) echo "https://google.com/search?as_sitesearch=$1&as_q=" ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
function frontend() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue