From 7827ec8839a6ecac3125cbdef433ac27a4310703 Mon Sep 17 00:00:00 2001 From: Ted Hanson Date: Thu, 9 Jun 2016 13:25:07 -0700 Subject: [PATCH] feat(AddCount): Display number of changes on prompt * Depends on wc / tr for determining number of changes to git repo --- prompt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prompt.sh b/prompt.sh index 6a737b8..e2a2e04 100644 --- a/prompt.sh +++ b/prompt.sh @@ -14,7 +14,8 @@ find_git_branch() { find_git_dirty() { local status=$(git status --porcelain 2> /dev/null) if [[ "$status" != "" ]]; then - git_dirty='*' + local change_count=$(echo "$status" | wc -l | tr -d '[[:space:]]') + git_dirty=$change_count else git_dirty='' fi