git colour prompt

This commit is contained in:
Rasmus Moorats 2021-08-05 14:21:03 +03:00
parent 67520a226d
commit 537c7f625f
Signed by: xx
GPG key ID: FE14255A6AE7241C

View file

@ -48,7 +48,7 @@ trap .prompt.git-status.sync ALRM
local MATCH MBEGIN MEND
local -a lines
lines=( ${(f)"$( git status -sbu 2> /dev/null )"} ) ||
lines=( ${(f)"$( git -c color.status=always status -sbu 2> /dev/null )"} ) ||
{ print; return } # Not a git repo
local -aU symbols=( ${(@MSu)lines[2,-1]##[^[:blank:]]##} )