From af546fe55783a2b9c83775a7b598d4d1221e4657 Mon Sep 17 00:00:00 2001 From: pauhull <22707808+pauhull@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:26:14 +0100 Subject: [PATCH] add colons to command group titles --- internal/cmd/util/util.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/cmd/util/util.go b/internal/cmd/util/util.go index 195ba9c7..dd62a127 100644 --- a/internal/cmd/util/util.go +++ b/internal/cmd/util/util.go @@ -195,6 +195,9 @@ func ValidateRequiredFlags(flags *pflag.FlagSet, names ...string) error { // AddGroup adds a group to the passed command and adds the passed commands to the group. func AddGroup(cmd *cobra.Command, id string, title string, groupCmds ...*cobra.Command) { + if !strings.HasSuffix(title, ":") { + title += ":" + } cmd.AddGroup(&cobra.Group{ID: id, Title: title}) for _, groupCmd := range groupCmds { groupCmd.GroupID = id