potentially finished git status script for bash prompt
This commit is contained in:
parent
8ce549de21
commit
11e0e56489
@ -7,9 +7,11 @@ if git status &>/dev/null; then
|
||||
to_push=${counts[0]}
|
||||
to_pull=${counts[1]}
|
||||
|
||||
extras=$([[ ${counts[0]} -eq 0 && ${counts[1]} -eq 0 ]] || echo " $to_push↑ $to_pull↓")
|
||||
|
||||
if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then
|
||||
echo "($branch* $to_push↑ $to_pull↓)"
|
||||
echo "($branch*$extras)"
|
||||
else
|
||||
echo "($branch~ $to_push↑ $to_pull↓)"
|
||||
echo "($branch~$extras)"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user