cobra icon indicating copy to clipboard operation
cobra copied to clipboard

A Commander for modern Go CLI interactions

Results 294 cobra issues
Sort by recently updated
recently updated
newest added

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...

area/docs-generation

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...

kind/bug
area/shell-completion

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") ```...

kind/feature
area/flags-args
lifecycle/needs-pr

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...

kind/bug
area/shell-completion
lifecycle/frozen

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,...

kind/bug
area/flags-args

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

kind/documentation
good-first-issue

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")...

area/cobra-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...

kind/feature
area/cobra-command
triage/needs-info
lifecycle/needs-pr

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...

kind/feature
area/lib

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...

area/flags-args
area/lib