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.
This commit is contained in:
Albert Vaca 2019-05-14 14:19:23 +02:00 committed by GitHub
parent 67fc4837d2
commit 2ec71fa11b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}