mirror of https://github.com/ohmyzsh/ohmyzsh.git
Compare commits
3 Commits
5cbc226c83
...
4aef60b5b6
Author | SHA1 | Date |
---|---|---|
|
4aef60b5b6 | |
|
5c17bcd21f | |
|
d7c1e0404a |
|
@ -211,6 +211,14 @@ function git_commits_behind() {
|
|||
fi
|
||||
}
|
||||
|
||||
function git_commits_status() {
|
||||
local ahead=$(git_commits_ahead)
|
||||
local behind=$(git_commits_behind)
|
||||
if [[ -n "$ahead$behind" ]]; then
|
||||
echo "$ZSH_THEME_GIT_COMMITS_STATUS_PREFIX$ahead$behind$ZSH_THEME_GIT_COMMITS_STATUS_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
# Outputs if current branch is ahead of remote
|
||||
function git_prompt_ahead() {
|
||||
if [[ -n "$(__git_prompt_git rev-list origin/$(git_current_branch)..HEAD 2> /dev/null)" ]]; then
|
||||
|
|
|
@ -52,6 +52,7 @@ Available search contexts are:
|
|||
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
|
||||
| `chatgpt` | `https://chatgpt.com/?q=` |
|
||||
| `reddit` | `https://www.reddit.com/search/?q=` |
|
||||
| `ppai` | `https://www.perplexity.ai/search/new?q=` |
|
||||
|
||||
Also there are aliases for bang-searching DuckDuckGo:
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ function web_search() {
|
|||
gopkg "https://pkg.go.dev/search?m=package&q="
|
||||
chatgpt "https://chatgpt.com/?q="
|
||||
reddit "https://www.reddit.com/search/?q="
|
||||
ppai "https://www.perplexity.ai/search/new?q="
|
||||
)
|
||||
|
||||
# check whether the search engine is supported
|
||||
|
@ -87,6 +88,7 @@ alias packagist='web_search packagist'
|
|||
alias gopkg='web_search gopkg'
|
||||
alias chatgpt='web_search chatgpt'
|
||||
alias reddit='web_search reddit'
|
||||
alias ppai='web_search ppai'
|
||||
|
||||
#add your own !bang searches here
|
||||
alias wiki='web_search duckduckgo \!w'
|
||||
|
|
Loading…
Reference in New Issue