diff --git a/zsh/apps/gitinfo.app.zsh b/zsh/apps/gitinfo.app.zsh index 8e274cb..53ba799 100644 --- a/zsh/apps/gitinfo.app.zsh +++ b/zsh/apps/gitinfo.app.zsh @@ -4,6 +4,7 @@ GITINFO_COMMIT_SHORTID="" GITINFO_COMMIT_COUNT=0 GITINFO_NEW_FILES="" GITINFO_MODIFIED_FILES="" +GITINFO_DELETED_FILES="" GITINFO_REMOTES="" GITINFO_STASHES_COUNT=0 @@ -87,10 +88,12 @@ function gitinfo_get_changes() if [ $? -eq 1 ]; then GITINFO_NEW_FILES="" GITINFO_MODIFIED_FILES="" + GITINFO_DELETED_FILES="" return 1 fi GITINFO_NEW_FILES=`LC_ALL=C git status | grep "new" | wc -l` GITINFO_MODIFIED_FILES=`LC_ALL=C git status | grep "modified" | wc -l` + GITINFO_DELETED_FILES=`LC_ALL=C git status | grep "deleted" | wc -l` } ###################################################################### diff --git a/zsh/prompts/pztrn.zsh b/zsh/prompts/pztrn.zsh index c7068e8..5db2697 100644 --- a/zsh/prompts/pztrn.zsh +++ b/zsh/prompts/pztrn.zsh @@ -80,7 +80,7 @@ prompt_pztrn_gitinfo() p_gitinfo_branch="$vars['brackets_start']$vars['usercolor']${GITINFO_BRANCH}$reset_color$vars['brackets_end']" p_gitinfo_commit="$vars['brackets_start']%{$fg[magenta]%}${GITINFO_COMMIT_SHORTID}$reset_color (%{$fg[cyan]%}${GITINFO_COMMIT_COUNT}$reset_color)$vars['brackets_end']" p_gitinfo_remotes="$vars['brackets_start']%{$fg[green]%}${GITINFO_REMOTES} remote(s)$reset_color$vars['brackets_end']" - p_gitinfo_files="$vars['brackets_start']%{$fg[green]%}${GITINFO_NEW_FILES}$reset_color new, %{$fg[yellow]%}${GITINFO_MODIFIED_FILES}$reset_color modified$vars['brackets_end']" + p_gitinfo_files="$vars['brackets_start']%{$fg[green]%}${GITINFO_NEW_FILES}$reset_color new, %{$fg[yellow]%}${GITINFO_MODIFIED_FILES}$reset_color modified, %{$fg[red]%}${GITINFO_DELETED_FILES} deleted$vars['brackets_end']" p_gitinfo=$'\n'"$p_gitinfo_branch$p_gitinfo_commit$p_gitinfo_files$p_gitinfo_remotes" else p_gitinfo=""