mirror of
https://github.com/spf13/cobra
synced 2025-05-06 13:27:26 +00:00
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:
parent
67fc4837d2
commit
2ec71fa11b
1 changed files with 1 additions and 1 deletions
|
@ -837,7 +837,7 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
|
||||||
}
|
}
|
||||||
if !c.SilenceErrors {
|
if !c.SilenceErrors {
|
||||||
c.Println("Error:", err.Error())
|
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
|
return c, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue