Merge pull request #75 from Winslett/command-not-found
Customizable command not found function
This commit is contained in:
6
help.go
6
help.go
@@ -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
|
||||
|
Reference in New Issue
Block a user