From dd185496866f6d15b0bdc8a047223e3859ad2dac Mon Sep 17 00:00:00 2001 From: Dilip Somavarapu Date: Thu, 16 Sep 2021 15:21:21 -0700 Subject: [PATCH] Update Help.go to make Sub Commands can be Hidden (#207) --- help.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/help.go b/help.go index 0a1c469..ad7cb80 100644 --- a/help.go +++ b/help.go @@ -539,6 +539,9 @@ func (h *HelpOptions) CommandTree(node *Node, prefix string) (rows [][2]string) rows = append(rows, [2]string{prefix + arg.Summary(), arg.Help}) } for _, subCmd := range node.Children { + if subCmd.Hidden { + continue + } rows = append(rows, h.CommandTree(subCmd, prefix)...) } return