use fzf for autocomplete

This commit is contained in:
2026-01-23 15:23:36 -05:00
parent 2517d0cb37
commit c5c733d14c
6 changed files with 59 additions and 112 deletions

View File

@@ -40,6 +40,12 @@ func TestAutocomplete(t *testing.T) {
search: "o",
want: these("bocchi", "ryo"),
},
{
name: "unrelated",
add: these("bocchi", "ryo", "nijika", "kita"),
search: "x",
want: nil,
},
{
name: "map",
add: these("Corazón ☆ Ardiente"),
@@ -49,7 +55,7 @@ func TestAutocomplete(t *testing.T) {
}
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
var set autocomplete.Set
var set autocomplete.Set[string]
for _, s := range c.add {
set.Add(s, s)
}