Adds untracked files to git prompt

This commit is contained in:
Jonathan Hodgson 2020-03-29 19:21:32 +01:00
parent 721b2aaa9d
commit c1b48ecb53

View file

@ -131,6 +131,10 @@ prompt_git(){
local modified=$(command git diff --name-only 2> /dev/null) local modified=$(command git diff --name-only 2> /dev/null)
local staged=$(command git diff --staged --name-only 2> /dev/null) local staged=$(command git diff --staged --name-only 2> /dev/null)
if [ -n "$untrackedFiles" ]; then
ret+=" "
color="orange1"
fi
if [ -n "$modified" ]; then if [ -n "$modified" ]; then
ret+=" " ret+=" "
color="orange1" color="orange1"