63477411eb073ec3ddaa925f6e88bfa94db1e596

Author
Arnaud Thimel <thimel@codelutin.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

feat(git-prompt): display untracked files count

Closes #8435
Closes #4880

Diff

 1diff --git a/plugins/git-prompt/git-prompt.plugin.zsh b/plugins/git-prompt/git-prompt.plugin.zsh
 2index da674af98db9a167db266fbd579a00e21f1a6a22..43a327ab059fb65964192eed2cdc3db05483387a 100644
 3--- a/plugins/git-prompt/git-prompt.plugin.zsh
 4+++ b/plugins/git-prompt/git-prompt.plugin.zsh
 5@@ -63,7 +63,7 @@ git_super_status() {
 6           STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CHANGED$GIT_CHANGED%{${reset_color}%}"
 7       fi
 8       if [ "$GIT_UNTRACKED" -ne "0" ]; then
 9-          STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED%{${reset_color}%}"
10+          STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED$GIT_UNTRACKED%{${reset_color}%}"
11       fi
12       if [ "$GIT_CHANGED" -eq "0" ] && [ "$GIT_CONFLICTS" -eq "0" ] && [ "$GIT_STAGED" -eq "0" ] && [ "$GIT_UNTRACKED" -eq "0" ]; then
13           STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CLEAN"
14@@ -83,7 +83,7 @@ ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[red]%}%{✖%G%}"
15 ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[blue]%}%{✚%G%}"
16 ZSH_THEME_GIT_PROMPT_BEHIND="%{↓%G%}"
17 ZSH_THEME_GIT_PROMPT_AHEAD="%{↑%G%}"
18-ZSH_THEME_GIT_PROMPT_UNTRACKED="%{…%G%}"
19+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%}%{…%G%}"
20 ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}%{✔%G%}"
21 
22 # Set the prompt.