allow overriding help name

This commit is contained in:
Tristan Zajonc
2015-08-12 21:58:25 -07:00
parent aced6e8739
commit cc46ca1020
2 changed files with 12 additions and 3 deletions

View File

@@ -157,7 +157,12 @@ func (c Command) startApp(ctx *Context) error {
// set the name and usage
app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
app.HelpName = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
if c.HelpName == "" {
app.HelpName = c.HelpName
} else {
app.HelpName = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
}
if c.Description != "" {
app.Usage = c.Description
} else {