We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 683eb7b commit 264217fCopy full SHA for 264217f
gincmd/lscmd.go
@@ -68,7 +68,17 @@ func lsRepo(cmd *cobra.Command, args []string) {
68
// print each category with len(items) > 0 with appropriate header
69
for _, status := range statuses {
70
fmt.Printf("%s:\n", status.Description())
71
- fmt.Printf("\n\t%s\n\n", strings.Join(statFiles[status], "\n\t"))
+ switch d := status.Description(); {
72
+ case strings.Contains(d, "modified"):
73
+ fmt.Printf(green("\n\t%s\n\n"), strings.Join(statFiles[status], "\n\t"))
74
+ case d == "Untracked":
75
+ fmt.Printf(red("\n\t%s\n\n"), strings.Join(statFiles[status], "\n\t"))
76
+ case d == "Removed":
77
+ fmt.Printf(yellow("\n\t%s\n\n"), strings.Join(statFiles[status], "\n\t"))
78
+ default:
79
+ fmt.Printf("\n\t%s\n\n", strings.Join(statFiles[status], "\n\t"))
80
+ }
81
+
82
}
83
84
0 commit comments