Skip to content

Commit

Permalink
do not search for partial complete if one already found
Browse files Browse the repository at this point in the history
  • Loading branch information
kovetskiy committed Jun 19, 2019
1 parent 67785a2 commit fac6a91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/tubectl/complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ func complete(items []string, query string) string {
return item
}

if strings.Contains(item, query) {
partial = item
if partial == "" {
if strings.Contains(item, query) {
partial = item
}
}
}

Expand Down

0 comments on commit fac6a91

Please sign in to comment.