This commit is contained in:
Olivier Mehani 2025-01-20 10:04:47 +01:00 committed by GitHub
commit 9b42c8fbd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -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