add ArgsUsage to App and Command
This commit is contained in:
@@ -18,6 +18,8 @@ type Command struct {
|
||||
Usage string
|
||||
// A longer explanation of how the command works
|
||||
Description string
|
||||
// A short description of the arguments of this command
|
||||
ArgsUsage string
|
||||
// The function to call when checking for bash command completions
|
||||
BashComplete func(context *Context)
|
||||
// An action to execute before any sub-subcommands are run, but after the context is ready
|
||||
@@ -158,6 +160,9 @@ func (c Command) startApp(ctx *Context) error {
|
||||
} else {
|
||||
app.Usage = c.Usage
|
||||
}
|
||||
if c.ArgsUsage == "" {
|
||||
c.ArgsUsage = "[arguments...]"
|
||||
}
|
||||
|
||||
// set CommandNotFound
|
||||
app.CommandNotFound = ctx.App.CommandNotFound
|
||||
|
Reference in New Issue
Block a user