diff --git a/app.go b/app.go index 9a15c0c..df6ecaf 100644 --- a/app.go +++ b/app.go @@ -17,6 +17,8 @@ type App struct { HelpName string // Description of the program. Usage string + // Text to override the USAGE section of help + UsageText string // Description of the program argument format. ArgsUsage string // Version of the program @@ -73,6 +75,7 @@ func NewApp() *App { Name: os.Args[0], HelpName: os.Args[0], Usage: "A new cli application", + UsageText: "", Version: "0.0.0", BashComplete: DefaultAppComplete, Action: helpCommand.Action, diff --git a/app_test.go b/app_test.go index ada5d69..93a67d0 100644 --- a/app_test.go +++ b/app_test.go @@ -22,6 +22,7 @@ func ExampleApp() { app.Action = func(c *Context) { fmt.Printf("Hello %v\n", c.String("name")) } + app.UsageText = "app [first_arg] [second_arg]" app.Author = "Harrison" app.Email = "harrison@lolwut.com" app.Authors = []Author{Author{Name: "Oliver Allen", Email: "oliver@toyshop.com"}}