mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
use git_prompt_ahead in git_prompt_info
now that git_prompt_ahead() works more consistenly and doesn't insist on the remote being called 'origin', we can actually include git_prompt_ahead() in the default prompt. git_prompt_ahead() makes use of ZSH_THEME_GIT_PROMPT_AHEAD which is currently unused, but can now be used to show if your branch is ahead of the one you are tracking
This commit is contained in:
parent
8217193b73
commit
e2def7f1f3
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# get the name of the branch we are on
|
# get the name of the branch we are on
|
||||||
function git_prompt_info() {
|
function git_prompt_info() {
|
||||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$(git_prompt_ahead)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks if working tree is dirty
|
# Checks if working tree is dirty
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue