cobra
cobra copied to clipboard
A Commander for modern Go CLI interactions
At the moment there is a difference between the error messages + output when a required argument is not filled in compared to when an unexisting flag is passed. I...
We generate our docs in RST from Cobra. I removed the indentations causing an error in the generated RST. This also makes the long descriptions consistent with the other completion...
Upgrade the yaml dep to version 3.
closes #1464 I also took the liberty to directly call it when generating docs as it seems that was already the case for `InitDefaultHelpCmd`
This is an alternate/superseding implementation for #1392. The default completion is useful also in cases where there are no subcommands, for example to provide completion for flags, and custom completions...
The current implementation of the default completion (and help) commands makes them available only when there are some other commands defined. This rules them out for apps that have no...
To allow setting a user-defined flag parser, we add a new SetFlagParseFunc to Command. This function, when set, will be called instead of pflag.Parse.
These changes makes sure a command doesn't exist before attempting to create it, if it does the user gets a `command already exists` message. I lost a lot of uncommited...
… headers
PersistentPreRun and PersistentPostRun are chained together so that each child PersistentPreRun is ran, and the PersistentPostRun are ran in reverse order. For example: Commands: root -> subcommand-a -> subcommand-b root...