forked from mirror/cobra
Update README.md to describe help behavior without subcommands
This commit is contained in:
parent
bd75ea1d19
commit
07a9dc0024
|
@ -216,11 +216,11 @@ For a more complete example of a larger application, please checkout [Hugo](http
|
||||||
|
|
||||||
## The Help Command
|
## The Help Command
|
||||||
|
|
||||||
Cobra automatically adds a help command to your application.
|
Cobra automatically adds a help command to your application when you have subcommands.
|
||||||
This will be called when a user runs 'app help'. Additionally help will also
|
This will be called when a user runs 'app help'. Additionally help will also
|
||||||
support all other commands as input. Say for instance you have a command called
|
support all other commands as input. Say for instance you have a command called
|
||||||
'create' without any additional configuration cobra will work when 'app help
|
'create' without any additional configuration cobra will work when 'app help
|
||||||
create' is called.
|
create' is called. Every command will automatically have the '--help' flag added.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue