mirror of https://github.com/ohmyzsh/ohmyzsh.git
Compare commits
3 Commits
27b46be583
...
a4f31be0bd
Author | SHA1 | Date |
---|---|---|
|
a4f31be0bd | |
|
5c17bcd21f | |
|
b2ec1229c2 |
|
@ -52,6 +52,7 @@ Available search contexts are:
|
||||||
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
|
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
|
||||||
| `chatgpt` | `https://chatgpt.com/?q=` |
|
| `chatgpt` | `https://chatgpt.com/?q=` |
|
||||||
| `reddit` | `https://www.reddit.com/search/?q=` |
|
| `reddit` | `https://www.reddit.com/search/?q=` |
|
||||||
|
| `ppai` | `https://www.perplexity.ai/search/new?q=` |
|
||||||
|
|
||||||
Also there are aliases for bang-searching DuckDuckGo:
|
Also there are aliases for bang-searching DuckDuckGo:
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ function web_search() {
|
||||||
gopkg "https://pkg.go.dev/search?m=package&q="
|
gopkg "https://pkg.go.dev/search?m=package&q="
|
||||||
chatgpt "https://chatgpt.com/?q="
|
chatgpt "https://chatgpt.com/?q="
|
||||||
reddit "https://www.reddit.com/search/?q="
|
reddit "https://www.reddit.com/search/?q="
|
||||||
|
ppai "https://www.perplexity.ai/search/new?q="
|
||||||
)
|
)
|
||||||
|
|
||||||
# check whether the search engine is supported
|
# check whether the search engine is supported
|
||||||
|
@ -87,6 +88,7 @@ alias packagist='web_search packagist'
|
||||||
alias gopkg='web_search gopkg'
|
alias gopkg='web_search gopkg'
|
||||||
alias chatgpt='web_search chatgpt'
|
alias chatgpt='web_search chatgpt'
|
||||||
alias reddit='web_search reddit'
|
alias reddit='web_search reddit'
|
||||||
|
alias ppai='web_search ppai'
|
||||||
|
|
||||||
#add your own !bang searches here
|
#add your own !bang searches here
|
||||||
alias wiki='web_search duckduckgo \!w'
|
alias wiki='web_search duckduckgo \!w'
|
||||||
|
|
|
@ -27,7 +27,7 @@ zstyle -s ':omz:update' mode update_mode || {
|
||||||
# - $ZSH is not a git repository
|
# - $ZSH is not a git repository
|
||||||
if [[ "$update_mode" = disabled ]] \
|
if [[ "$update_mode" = disabled ]] \
|
||||||
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
||||||
|| [[ ! -t 1 ]] \
|
|| ([[ "$update_mode" != auto ]] && [[ ! -t 1 ]]) \
|
||||||
|| ! command git --version 2>&1 >/dev/null \
|
|| ! command git --version 2>&1 >/dev/null \
|
||||||
|| (builtin cd -q "$ZSH"; ! command git rev-parse --is-inside-work-tree &>/dev/null); then
|
|| (builtin cd -q "$ZSH"; ! command git rev-parse --is-inside-work-tree &>/dev/null); then
|
||||||
unset update_mode
|
unset update_mode
|
||||||
|
|
Loading…
Reference in New Issue