Re-order items in vcs

This commit is contained in:
Ceda EI 2019-02-19 00:05:40 +05:30
parent 5f90303bb1
commit 425ddc114e
1 changed files with 4 additions and 3 deletions

View File

@ -18,12 +18,13 @@ function wish_vcs_main() {
local op=$(git diff --numstat HEAD 2> /dev/null || echo -1) local op=$(git diff --numstat HEAD 2> /dev/null || echo -1)
if [[ $op != "-1" ]]; then if [[ $op != "-1" ]]; then
local git 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 $WISH_VCS_GIT_SYMBOL "
git="$git$(git branch | grep -F \* | sed 's/\* //') " 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 add=$(echo "$op" | awk '{a += $1} END {print a}')
local del=$(echo "$op" | awk '{d += $2} END {print d}') local del=$(echo "$op" | awk '{d += $2} END {print d}')
if [[ $add != 0 ]] || [[ $del != 0 ]]; then if [[ $add != 0 ]] || [[ $del != 0 ]]; then