From 425ddc114ea00c21157a1d5463dabc9f6a401fcb Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Tue, 19 Feb 2019 00:05:40 +0530 Subject: [PATCH] Re-order items in vcs --- plugins/vcs.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/vcs.sh b/plugins/vcs.sh index d53ac19..3822d77 100644 --- a/plugins/vcs.sh +++ b/plugins/vcs.sh @@ -18,12 +18,13 @@ function wish_vcs_main() { local op=$(git diff --numstat HEAD 2> /dev/null || echo -1) if [[ $op != "-1" ]]; then local git - if [[ $(git status --porcelain 2> /dev/null | grep "^??") != "" ]]; then - local git=" $WISH_VCS_GIT_UNTRACKED_SYMBOL" - fi git="$git $WISH_VCS_GIT_SYMBOL " git="$git$(git branch | grep -F \* | sed 's/\* //') " + if [[ $(git status --porcelain 2> /dev/null | grep "^??") != "" ]]; then + git="$git$WISH_VCS_GIT_UNTRACKED_SYMBOL " + fi + local add=$(echo "$op" | awk '{a += $1} END {print a}') local del=$(echo "$op" | awk '{d += $2} END {print d}') if [[ $add != 0 ]] || [[ $del != 0 ]]; then