diff options
author | Lennart Ochel <lennart.ochel@vti.se> | 2022-11-12 11:46:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-12 11:46:06 +0100 |
commit | fb66b67d683935cd0e4a5282064947a28087a91b (patch) | |
tree | 42d11b428361f2cdda73ba95e0e17228ca56a837 /plugins/git-prompt/git-prompt.plugin.zsh | |
parent | 62929263fafd9e3c1da043bc9b40fa97fccfa7a1 (diff) | |
download | zsh-fb66b67d683935cd0e4a5282064947a28087a91b.tar.gz zsh-fb66b67d683935cd0e4a5282064947a28087a91b.tar.bz2 zsh-fb66b67d683935cd0e4a5282064947a28087a91b.zip |
feat(git-prompt): show deleted files (#11245)
Diffstat (limited to 'plugins/git-prompt/git-prompt.plugin.zsh')
-rw-r--r-- | plugins/git-prompt/git-prompt.plugin.zsh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/git-prompt/git-prompt.plugin.zsh b/plugins/git-prompt/git-prompt.plugin.zsh index 0485e317c..dcda418cf 100644 --- a/plugins/git-prompt/git-prompt.plugin.zsh +++ b/plugins/git-prompt/git-prompt.plugin.zsh @@ -47,6 +47,7 @@ function update_current_git_vars() { GIT_UNTRACKED=$__CURRENT_GIT_STATUS[7] GIT_STASHED=$__CURRENT_GIT_STATUS[8] GIT_CLEAN=$__CURRENT_GIT_STATUS[9] + GIT_DELETED=$__CURRENT_GIT_STATUS[10] } git_super_status() { @@ -69,6 +70,9 @@ git_super_status() { if [ "$GIT_CHANGED" -ne "0" ]; then STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CHANGED$GIT_CHANGED%{${reset_color}%}" fi + if [ "$GIT_DELETED" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_DELETED$GIT_DELETED%{${reset_color}%}" + fi if [ "$GIT_UNTRACKED" -ne "0" ]; then STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED$GIT_UNTRACKED%{${reset_color}%}" fi @@ -91,6 +95,7 @@ ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}" ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[red]%}%{●%G%}" ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[red]%}%{✖%G%}" ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[blue]%}%{✚%G%}" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[blue]%}%{-%G%}" ZSH_THEME_GIT_PROMPT_BEHIND="%{↓%G%}" ZSH_THEME_GIT_PROMPT_AHEAD="%{↑%G%}" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%}%{…%G%}" |