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

### Problem Currently, flag completion functions are a global map, preventing garbage collection to work properly, especially if the commands using these funcs are garbage-collected themselves. This might happen if...

Trying this in my terminal gives me the following result: The correct operation should be: `go get -u github.com/spf13/cobra@latest`

When using ActiveHelp with `bash`, if the program name is prefixed with a variable or similar, re-printing the command-line does not reprint the prefix. For example, using the `tanzu` CLI...

kind/bug
area/shell-completion

I have an issue with the way Cobra shows Usage section in Help message. I have rootCmd that has sub-commands and flags. Both can be given at the same time....

This fixes inconsistencies between the command help template and what is being generated as markdown. Currently, the help template prints "Flags" and "Global Flags" when printing help for flags, while...

area/docs-generation

https://github.com/spf13/cobra/blob/a0a6ae020bb3899ff0276067863e50523f897370/command.go#L780-L782 It appears there are some fixes for these `// #nosec` linter bypasses: https://github.com/securego/gosec/pull/1017 We should investigate if we can consume these and not have to bypass this lint

resolves #2054

area/docs-generation
kind/cleanup

Where `name` is substituted for `%[1]s`, this provides PowerShell argument completer for all `%[1]s` commands and aliases. In case of `podman`, this is especially useful when user set `docker` as...

triage/blocked

Currently the Powershell completion generator registers the completion for the default command name. Any aliases of the command will not have completion enabled. (e.g. `k -> kubectl`) This change will...

area/shell-completion
triage/blocked

I support the current implementation of `NoOptDefVal`, but what I don't like is the change in behaviour for a single field when `NoOptDefVal` is enabled. I.e. `myApp -a aVal -b...