From 6fcc190f78f5016c18bb3795b46a990f30ca2f57 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Wed, 8 Aug 2018 14:42:56 +1000 Subject: [PATCH] Don't suggest hidden commands. --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index 0a43daf..3a942a8 100644 --- a/context.go +++ b/context.go @@ -307,7 +307,7 @@ func (c *Context) trace(node *Node) (err error) { // nolint: gocyclo // After positional arguments have been consumed, check commands next... for _, branch := range node.Children { - if branch.Type == CommandNode { + if branch.Type == CommandNode && !branch.Hidden { candidates = append(candidates, branch.Name) } if branch.Type == CommandNode && branch.Name == token.Value {