diff --git a/command.go b/command.go index 541081a59c..d7b05637d2 100644 --- a/command.go +++ b/command.go @@ -85,9 +85,9 @@ type Command struct { Writer io.Writer `json:"-"` // ErrWriter writes error output ErrWriter io.Writer `json:"-"` - // ExitErrHandler processes any error encountered while running an App before - // it is returned to the caller. If no function is provided, HandleExitCoder - // is used as the default behavior. + // ExitErrHandler processes any error encountered while running a Command before it is + // returned to the caller. If no function is provided, HandleExitCoder is used as the + // default behavior. ExitErrHandler ExitErrHandlerFunc `json:"-"` // Other custom info Metadata map[string]interface{} `json:"metadata"` diff --git a/command_run.go b/command_run.go index 44ffc22349..6b2abc1b90 100644 --- a/command_run.go +++ b/command_run.go @@ -175,9 +175,9 @@ func (cmd *Command) run(ctx context.Context, osArgs []string) (_ context.Context } if !cmd.hideHelp() { if cmd.parent == nil { - tracef("running ShowAppHelp") - if err := ShowAppHelp(cmd); err != nil { - tracef("SILENTLY IGNORING ERROR running ShowAppHelp %[1]v (cmd=%[2]q)", err, cmd.Name) + tracef("running ShowRootCommandHelp") + if err := ShowRootCommandHelp(cmd); err != nil { + tracef("SILENTLY IGNORING ERROR running ShowRootCommandHelp %[1]v (cmd=%[2]q)", err, cmd.Name) } } else { tracef("running ShowCommandHelp with %[1]q", cmd.Name) diff --git a/docs/v3/examples/full-api-example.md b/docs/v3/examples/full-api-example.md index fb574141ae..9857e89826 100644 --- a/docs/v3/examples/full-api-example.md +++ b/docs/v3/examples/full-api-example.md @@ -185,9 +185,9 @@ func main() { return nil }, Action: func(ctx context.Context, cmd *cli.Command) error { - cli.DefaultAppComplete(ctx, cmd) + cli.DefaultRootCommandComplete(ctx, cmd) cli.HandleExitCoder(errors.New("not an exit coder, though")) - cli.ShowAppHelp(cmd) + cli.ShowRootCommandHelp(cmd) cli.ShowCommandHelp(ctx, cmd, "also-nope") cli.ShowSubcommandHelp(cmd) cli.ShowVersion(cmd) diff --git a/docs/v3/examples/help/generated-help-text.md b/docs/v3/examples/help/generated-help-text.md index 3f11b757a4..973a85756d 100644 --- a/docs/v3/examples/help/generated-help-text.md +++ b/docs/v3/examples/help/generated-help-text.md @@ -11,11 +11,10 @@ or subcommand, and break execution. #### Customization -All of the help text generation may be customized, and at multiple levels. The -templates are exposed as variables `AppHelpTemplate`, `CommandHelpTemplate`, and -`SubcommandHelpTemplate` which may be reassigned or augmented, and full override -is possible by assigning a compatible func to the `cli.HelpPrinter` variable, -e.g.: +All of the help text generation may be customized, and at multiple levels. The templates +are exposed as variables `RootCommandHelpTemplate`, `CommandHelpTemplate`, and +`SubcommandHelpTemplate` which may be reassigned or augmented, and full override is +possible by assigning a compatible func to the `cli.HelpPrinter` variable, e.g.: