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

This PR introduces a new flag group function, `MarkIfFlagPresentThenOthersRequired`, which enforces a "one-way required together" relationship among flags. This means that if a **primary flag** is set, then other **dependent...

I initially made this issue under chezmoi, but was told I should make it in the upstream cobra repo instead. https://github.com/twpayne/chezmoi/issues/4251 Currently tab completion in PowerShell just looks up the...

There are two commands: main and sub-command. In the main command there is PersistentFlag `name`. As i understand there are three options: - define flag `name` in the sub-command. But...

Closes #2209. Is this implementation acceptable? /cc @thaJeztah

The `SetErrPrefix` method introduced in https://github.com/spf13/cobra/pull/2023 is nice, but I wanted to set it to an empty string `""`, but discovered that this is treated the same as if you...

Adds aliases to generated markdown docs, similar to how it's handled in the default help template: ``` Aliases: {{.NameAndAliases}}{{end}}{{if .HasExample}} ```

area/docs-generation

This implements the proposal #1394.

At the bottom of https://cobra.dev/ there is a link to "Markdown" https://cobra.dev/doc/md_docs.md. This link is broken: 404

In the cobra website scrolling down to the last heading: bash autocompletions, it is mentioned " read more in bash commands" but that hyperlink takes us to a 404 page....

While building an internal CLI tool with Cobra, I needed to integrate authentication with our backend services using OAuth2. Specifically, I was looking to implement the [[device authorization flow](https://datatracker.ietf.org/doc/html/rfc8628)](https://datatracker.ietf.org/doc/html/rfc8628). However,...