From 44242f9e609f6b3b0b3a342fe396e0471eb35a23 Mon Sep 17 00:00:00 2001 From: Lars Kajes Date: Wed, 11 Oct 2023 14:44:08 +0200 Subject: [PATCH] falgs are inherited, not global --- command.go | 2 +- command_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command.go b/command.go index 909d8585..bded3df4 100644 --- a/command.go +++ b/command.go @@ -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}} diff --git a/command_test.go b/command_test.go index 4afb7f7b..8675c912 100644 --- a/command_test.go +++ b/command_test.go @@ -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 `