mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
falgs are inherited, not global
This commit is contained in:
parent
5d16684e88
commit
44242f9e60
2 changed files with 2 additions and 2 deletions
|
@ -568,7 +568,7 @@ Additional Commands:{{range $cmds}}{{if (and (eq .GroupID "") (or .IsAvailableCo
|
|||
Flags:
|
||||
{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasAvailableInheritedFlags}}
|
||||
|
||||
Global Flags:
|
||||
Flags inherited from parent commands:
|
||||
{{.InheritedFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if .HasHelpSubCommands}}
|
||||
|
||||
Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}}
|
||||
|
|
|
@ -921,7 +921,7 @@ Flags:
|
|||
--foo child foo usage
|
||||
-h, --help help for child
|
||||
|
||||
Global Flags:
|
||||
Flags inherited from parent commands:
|
||||
--bar parent bar usage
|
||||
`
|
||||
|
||||
|
|
Loading…
Reference in a new issue