summaryrefslogtreecommitdiff
path: root/complete.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2019-07-05 17:33:47 +0300
committerGitHub <[email protected]>2019-07-05 17:33:47 +0300
commit2f2ff270a9f6adcef8351b1bdf5319b5d612b53f (patch)
tree0dbc83883d33ac239db651f19be3fe67fd3dc361 /complete.go
parent6ffe496ea9530c0638974624ed9dd429f9ad592e (diff)
parent72c5c945f0d5861ba1d4e51a0a5ac36a4bef3868 (diff)
Merge pull request #98 from posener/refactor
Some refactorings
Diffstat (limited to 'complete.go')
-rw-r--r--complete.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/complete.go b/complete.go
index 991bdea..423cbec 100644
--- a/complete.go
+++ b/complete.go
@@ -6,9 +6,9 @@ import (
"io"
"os"
"strconv"
+ "strings"
"github.com/posener/complete/cmd"
- "github.com/posener/complete/match"
)
const (
@@ -72,7 +72,7 @@ func (c *Complete) Complete() bool {
// filter only options that match the last argument
matches := []string{}
for _, option := range options {
- if match.Prefix(option, a.Last) {
+ if strings.HasPrefix(option, a.Last) {
matches = append(matches, option)
}
}