mirror of https://github.com/ohmyzsh/ohmyzsh.git
Compare commits
3 Commits
eeca0a4212
...
96c514b755
Author | SHA1 | Date |
---|---|---|
|
96c514b755 | |
|
7a3695aadf | |
|
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
|
||||
|
|
|
@ -5,6 +5,7 @@ files=(
|
|||
/etc/grc.zsh # default
|
||||
/usr/local/etc/grc.zsh # homebrew darwin-x64
|
||||
/opt/homebrew/etc/grc.zsh # homebrew darwin-arm64
|
||||
/home/linuxbrew/.linuxbrew/etc/grc.zsh # linuxbrew
|
||||
/usr/share/grc/grc.zsh # Gentoo Linux (app-misc/grc)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue