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 /complete.go | |
| parent | 5e07cbd4c20a5a3bb5bc84148dc4d4ebffa3d033 (diff) | |
Renamings
Diffstat (limited to 'complete.go')
| -rw-r--r-- | complete.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/complete.go b/complete.go index 6345e63..e7e209e 100644 --- a/complete.go +++ b/complete.go @@ -34,10 +34,10 @@ func (c *Completer) complete(args []string) []string { return c.chooseRelevant(last(args), all) } -func (c *Completer) chooseRelevant(last string, list []Option) (options []string) { - for _, sub := range list { - if sub.Matches(last) { - options = append(options, sub.String()) +func (c *Completer) chooseRelevant(last string, options []Option) (relevant []string) { + for _, option := range options { + if option.Matches(last) { + relevant = append(relevant, option.String()) } } return |
