From 04d16f6064c7c71068f47b4e7106f15a05b6b326 Mon Sep 17 00:00:00 2001 From: Eyal Posener Date: Fri, 5 May 2017 21:59:10 +0300 Subject: Renamings --- command.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'command.go') 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) -- cgit v1.2.3