diff options
Diffstat (limited to 'complete.go')
| -rw-r--r-- | complete.go | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/complete.go b/complete.go index 2780e62..be0876e 100644 --- a/complete.go +++ b/complete.go @@ -51,27 +51,13 @@ func (c *Complete) Run() bool { a := newArgs(line) - options := complete(c.Command, a) + options := c.Command.Predict(a) Log("Completion: %s", options) output(options) return true } -// complete get a command an command line arguments and returns -// matching completion options -func complete(c Command, a args) (matching []string) { - options, _ := c.predict(a) - - for _, option := range options { - Log("option %T, %s -> %t", option, option, option.Match(a.beingTyped)) - if option.Match(a.beingTyped) { - matching = append(matching, option.String()) - } - } - return -} - func getLine() ([]string, bool) { line := os.Getenv(envComplete) if line == "" { |
