Merge pull request #186 from nrdufour/master

Fixing the issue with a command with subcommands not showing help message
This commit is contained in:
Jesse Szwedko
2015-03-09 19:37:25 -07:00
2 changed files with 7 additions and 1 deletions

View File

@@ -111,6 +111,12 @@ func DefaultAppComplete(c *Context) {
// Prints help for the given command
func ShowCommandHelp(c *Context, command string) {
// show the subcommand help for a command with subcommands
if command == "" {
HelpPrinter(SubcommandHelpTemplate, c.App)
return
}
for _, c := range c.App.Commands {
if c.HasName(command) {
HelpPrinter(CommandHelpTemplate, c)