Introduce override hooks for suggestions
Related to https://github.com/urfave/cli/pull/1390#discussion_r871398659
This commit is contained in:
@@ -221,7 +221,7 @@ func ShowCommandHelp(ctx *Context, command string) error {
|
||||
if ctx.App.CommandNotFound == nil {
|
||||
errMsg := fmt.Sprintf("No help topic for '%v'", command)
|
||||
if ctx.App.Suggest {
|
||||
if suggestion := suggestCommand(ctx.App.Commands, command); suggestion != "" {
|
||||
if suggestion := SuggestCommand(ctx.App.Commands, command); suggestion != "" {
|
||||
errMsg += ". " + suggestion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user