mirror of
https://github.com/spf13/cobra
synced 2024-11-16 10:47:09 +00:00
Help uses Short message if Long is not available
This commit is contained in:
parent
e784a59910
commit
63a019d93a
1 changed files with 1 additions and 1 deletions
|
@ -248,7 +248,7 @@ func (c *Command) HelpTemplate() string {
|
|||
if c.HasParent() {
|
||||
return c.parent.HelpTemplate()
|
||||
} else {
|
||||
return `{{.Long | trim}}
|
||||
return `{{with or .Long .Short }}{{. | trim}}{{end}}
|
||||
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}
|
||||
`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue