From 960475cc3beef910200ceb8297913f6d72616012 Mon Sep 17 00:00:00 2001 From: rsteube Date: Wed, 14 Sep 2022 17:52:02 +0200 Subject: [PATCH] git: ActionChanges - style for deleted files --- pkg/actions/tools/git/change.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/actions/tools/git/change.go b/pkg/actions/tools/git/change.go index 0d2372fe21..13b211a8cb 100644 --- a/pkg/actions/tools/git/change.go +++ b/pkg/actions/tools/git/change.go @@ -42,7 +42,11 @@ func ActionChanges(opts ChangeOpts) carapace.Action { if relativePath, err := filepath.Rel(c.Dir, root+"/"+path); err != nil { return carapace.ActionMessage(err.Error()) } else { - untracked = append(untracked, relativePath, line[:2], style.ForPath(relativePath)) + if status := line[:2]; strings.Contains(status, "D") { // deleted + untracked = append(untracked, relativePath, status, style.ForPathExt(relativePath)) + } else { + untracked = append(untracked, relativePath, status, style.ForPath(relativePath)) + } } } }