summaryrefslogtreecommitdiff
path: root/command.go
diff options
context:
space:
mode:
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()...)
}