Update Help.go to make Sub Commands can be Hidden (#207)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user