cobra
cobra copied to clipboard
A Commander for modern Go CLI interactions
When using [`GenMarkdownTreeCustom`](https://github.com/spf13/cobra/blob/b97b5ead31f7d34f764ac8666e40c214bb8e06dc/doc/md_docs.go#L130) to generate markdown docs, it would be helpful to be able to specify my own [`GenMarkdownCustom`](https://github.com/spf13/cobra/blob/b97b5ead31f7d34f764ac8666e40c214bb8e06dc/doc/md_docs.go#L54) func as opposed to the one used by Cobra in order...
Other shell completions escape whitespace in completions, but bash completions seems to add completions with whitespace as multiple suggestions or multiple arguments depending on bash version. I would expect also...
Hi all! I would like to have different groups that created using option MarkFlagsRequiredTogether with the same flag. I.e. I would like to have this: ``` rootCmd.MarkFlagsRequiredTogether("cpuprofile","diag") rootCmd.MarkFlagsRequiredTogether("memprofile", "diag") ```...
Cobra supports a "no space" format for short flags. I had used it before, but I never really paid attention to it in the code base. For example: ``` kubectl...
I'm noticing that when I pass nothing (or an emptry string) to the shortened version of a flag I'm not getting nothing from `Flags.GetString`. When I use the full flag,...
The documentation page contains links to how to setup bash completion / man page completion but those links are 404: https://cobra.dev/doc/md_docs.md https://cobra.dev/doc/rest_docs.md https://cobra.dev/doc/man_docs.md https://cobra.dev/bash_completions.md
Consider the following program: ```golang c := cobra.Command{...} c.SetOut(os.Stdout) c.SetErr(os.Stderr) ``` **Expected behavior:** Cobra prints help text, version information, and shell completion to _Stdout_; and error messages (e.g. "unknown command")...
Use of Cobra provides consistent user experience for CLI users, and makes it simple to generate high-quality user docs for commands. Imagine if you could also describe to Cobra the...
If we are using two commands together in a cli, eg: ```apictl list apis -e dev``` (listCmd added to RootCmd and listAPIsCmd added to listCmd). we are deprecating the middle...
in minikube our start command has many flags and we would like to group them for better readablility $ minikube start --help Starts a local Kubernetes cluster Options: --addons=[]: Enable...