Skip to content

Commit

Permalink
falgs are inherited, not global
Browse files Browse the repository at this point in the history
  • Loading branch information
kajes committed Oct 11, 2023
1 parent 5d16684 commit 44242f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
`

Expand Down

0 comments on commit 44242f9

Please sign in to comment.