copy the CommandNotFound when running as a subcommand

This commit is contained in:
Kyle Allan 2014-07-24 23:48:10 -07:00
parent 27ecc97192
commit 1880853f15

3
app.go
View File

@ -151,6 +151,9 @@ func (a *App) RunAsSubcommand(ctx *Context) error {
}
}
// add the App's CommandNotFound
a.CommandNotFound = ctx.App.CommandNotFound
// append flags
if a.EnableBashCompletion {
a.appendFlag(BashCompletionFlag)