Display pflag.CommandLine flags as if they were declared on the parent
Before adoption: this commit came in with the history the project adopted, so no landing records it.
```go package main import ( "github.com/spf13/cobra" "github.com/spf13/pflag" ) func main() { cmd := &cobra.Command{ Use: "min", Short: "minimal command", Run: func(_ *cobra.Command, _ []string) {}, } pflag.String("oncmdline", "oncmdline", "oncmdline") cmd.Execute() } ``` Is a minimal cobra program. When --help is displayed without this patch you only get: But with the patch --oncmdline is shows under flags.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+15 added−1 removed
- other:+15 added−1 removed