summaryrefslogtreecommitdiff
path: root/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'command.go')
-rw-r--r--command.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/command.go b/command.go
index f3321fb..9292a89 100644
--- a/command.go
+++ b/command.go
@@ -2,7 +2,7 @@ package complete
type Commands map[string]Command
-type Flags map[string]FlagOptions
+type Flags map[string]Predicate
type Command struct {
Sub Commands
@@ -18,8 +18,8 @@ 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 options, ok := c.Flags[last(args)]; ok && options.HasFollow {
- return options.follows(), true
+ if predicate, ok := c.Flags[last(args)]; ok && predicate.Expects {
+ return predicate.predict(), true
}
sub, options, only := c.searchSub(args)