Don't suggest hidden commands.

This commit is contained in:
Alec Thomas
2018-08-08 14:42:56 +10:00
parent 856d62e28a
commit 6fcc190f78
+1 -1
View File
@@ -307,7 +307,7 @@ func (c *Context) trace(node *Node) (err error) { // nolint: gocyclo
// After positional arguments have been consumed, check commands next... // After positional arguments have been consumed, check commands next...
for _, branch := range node.Children { for _, branch := range node.Children {
if branch.Type == CommandNode { if branch.Type == CommandNode && !branch.Hidden {
candidates = append(candidates, branch.Name) candidates = append(candidates, branch.Name)
} }
if branch.Type == CommandNode && branch.Name == token.Value { if branch.Type == CommandNode && branch.Name == token.Value {