Skip to content

Commit

Permalink
feat(AddCount): Display number of changes on prompt
Browse files Browse the repository at this point in the history
* Depends on wc / tr for determining number of changes to git repo
  • Loading branch information
Ted Hanson authored and Ted Hanson committed Jan 30, 2017
1 parent 75781b7 commit 7d03a70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d03a70

Please sign in to comment.