diff options
| author | Eyal Posener <[email protected]> | 2017-05-05 21:59:10 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-05 22:15:23 +0300 |
| commit | 04d16f6064c7c71068f47b4e7106f15a05b6b326 (patch) | |
| tree | 5498e40a0104754d5f06ccfd125c82d2d13b2931 /command.go | |
| parent | 5e07cbd4c20a5a3bb5bc84148dc4d4ebffa3d033 (diff) | |
Renamings
Diffstat (limited to 'command.go')
| -rw-r--r-- | command.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |
