From 2ec71fa11b119828823cc85d4be5b5fb56d41cfa Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Tue, 14 May 2019 14:19:23 +0200 Subject: [PATCH] Changed default usage command to just "help" Cobra's `InitDefaultHelpCmd()` sets `help` and not `--help` as the command to print the usage. It makes more sense for the default `usageTemplate` to point to the default help command. --- command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.go b/command.go index b257f91b..b37c1175 100644 --- a/command.go +++ b/command.go @@ -837,7 +837,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { } if !c.SilenceErrors { c.Println("Error:", err.Error()) - c.Printf("Run '%v --help' for usage.\n", c.CommandPath()) + c.Printf("Run '%v help' for usage.\n", c.CommandPath()) } return c, err }