From 1880853f15b1f0534c99b141b10eaa48613e8ce5 Mon Sep 17 00:00:00 2001 From: Kyle Allan Date: Thu, 24 Jul 2014 23:48:10 -0700 Subject: [PATCH] copy the CommandNotFound when running as a subcommand --- app.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.go b/app.go index e193b82..4ae0c5e 100644 --- a/app.go +++ b/app.go @@ -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)