codegangsta/cli — pull request #121 by KAllan357 (2014-07-25 17:11:41+00:00)
Title: Copy CommandNotFound into the NewApp for subcommands

Hi @codegangsta,

I noticed that when you added a `CommandNotFound` function to your app, it would never work when you ran s subcommand.

```
[kallan@KAlla1ml1:~/go/src/github.com/KAllan357/bootcamp] $ go run cli.go example
NAME:
test example - example

USAGE:
test example command [command options] [arguments...]

COMMANDS:
sub	sub
help, h	Shows a list of commands or help for one command

OPTIONS:
--help, -h	show help

[kallan@KAlla1ml1:~/go/src/github.com/KAllan357/bootcamp] $ go run cli.go example foo
No help topic for 'foo'
```

I noticed that in command.go that `NewApp()` is called before a subcommand is executed. I think that the fix here for now (barring say adding a custom CommandNotFound to the Command struct) is to just copy the CommandNotFound down into the subcommand. In most cases, it makes sense that your entire CLI app would want the same behavior when it encounters a command that does not exist.

Here's an example of the output after the change:

```
[kallan@KAlla1ml1:~/go/src/github.com/KAllan357/bootcamp] $ go run cli.go example foo
No help topic for 'foo'
```