cobra
cobra copied to clipboard
A Commander for modern Go CLI interactions
it looks like the parser is having trouble with space delimited persistent flags, where a sub command aligns with the value of the first of many flags: for `./app -z...
I feel like I'm missing something with autocomplete suggestions. I want it to suggest the names "steve" and "john" (for the command below) but all it does is suggest files...
### Description This PR adds minimum token permissions for the GITHUB_TOKEN in GitHub Actions workflows using https://github.com/step-security/secure-workflows. GitHub Actions workflows have a GITHUB_TOKEN with `write` access to multiple scopes. Here...
If you use a function to create a new instance of a command to allow testing with different arg inputs without risk of state being preserved between tests, can run...
First, spf13/cobra is just brilliant and elegant! Also, it is extremely popular and broadly used. I was inspired by a functionality that exists in [`azure-cli`](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/feedback/custom.py) that automates and makes more...
This test Cobra app, https://github.com/kurtpeek/myCobraApp, illustrates the issue. It was scaffolded using the Cobra generator with the following commands: ``` cobra add serve cobra add config cobra add command cobra...
It looks like the disable ordering feature is not working with commands with persistent flags **only**. But works fine if commands have local flags or both local and persistent flags....
Hi. It would be nice to allow the user to auto complete flags like `--help, `--version` etc. For example, the `git` completion allows `git --v[TAB]` to auto complete to `git...
## Description Add group flags Close https://github.com/spf13/cobra/issues/1327 ## Example main.go ``` package main import ( "fmt" "github.com/spf13/cobra" ) func main() { var output string var rootCmd = &cobra.Command{ Use: "root...
Using spf13/Cobra for cli flag parsing. root command has a field marked required: ``` rootCmd.PersistentFlags().StringVarP(&configFilePath, "config", "c","", "REQUIRED: config file") rootCmd.MarkPersistentFlagRequired("config") rootCmd.MarkFlagRequired("config") ``` However, cobra does not raise an error...