Merge pull request #75 from Winslett/command-not-found

Customizable command not found function
This commit is contained in:
Jeremy Saenz
2014-04-22 20:33:49 -07:00
3 changed files with 30 additions and 1 deletions

View File

@@ -115,7 +115,11 @@ func ShowCommandHelp(c *Context, command string) {
}
}
fmt.Printf("No help topic for '%v'\n", command)
if c.App.CommandNotFound != nil {
c.App.CommandNotFound(c, command)
} else {
fmt.Printf("No help topic for '%v'\n", command)
}
}
// Prints help for the given subcommand