summaryrefslogtreecommitdiff
path: root/command.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-06 00:25:27 +0300
committerEyal Posener <[email protected]>2017-05-06 00:25:27 +0300
commit1af7c0b3b7bc0e4bf5605be7e02154a8876cba84 (patch)
treebb3220c9de676f16970ffb7c204aa3377194661f /command.go
parentc8263230e11aa755d3b0b964d4bf7ff296661f5e (diff)
Roughly add all go commands
Diffstat (limited to 'command.go')
-rw-r--r--command.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/command.go b/command.go
index e2f5eb4..32c5456 100644
--- a/command.go
+++ b/command.go
@@ -19,7 +19,7 @@ func (c *Command) options(args []string) (options []Option, only bool) {
// if prev has something that needs to follow it,
// it is the most relevant completion
- if predicate, ok := c.Flags[last(args)]; ok && predicate.Expects {
+ if predicate, ok := c.Flags[last(args)]; ok && !predicate.ExpectsNothing {
return predicate.predict(), true
}
@@ -40,7 +40,7 @@ func (c *Command) options(args []string) (options []Option, only bool) {
}
// add additional expected argument of the command
- if c.Args.Expects {
+ if !c.Args.ExpectsNothing {
options = append(options, c.Args.predict()...)
}