main: skip display of commands without descriptions
1 files changed, 7 insertions(+), 0 deletions(-) M main.go
M main.go +7 -0
@@ 56,7 56,14 @@ var baseCmd = &cobra.Command{ func listCmdHelp(cmds desc.Commands) { fmt.Printf("--- found %d possible commands ---\n", len(cmds)) + var filter bool + if len(cmds) > 1 { + filter = true + } for _, cdesc := range cmds { + if filter && cdesc.Help == "" { + continue + } fmt.Printf( "command: \n %v\n %v\n", strings.Join(cdesc.FormattedArgs(), " "),