From 78f9a3e3c667e7f075cb0bf0c4e8c4a32376162a Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Mon, 13 Dec 2021 13:54:03 +0100 Subject: [PATCH] fix(git): add untracked to status resolves #1422 --- src/segment_git.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/segment_git.go b/src/segment_git.go index 733f4566..f3c0dff6 100644 --- a/src/segment_git.go +++ b/src/segment_git.go @@ -227,6 +227,11 @@ func (g *git) setGitStatus() { if len(status) <= 4 { return } + const UNTRACKED = "?" + if strings.HasPrefix(status, UNTRACKED) { + g.Working.add(UNTRACKED) + return + } workingCode := status[3:4] stagingCode := status[2:3] g.Working.add(workingCode)