feat(readline): pass suggestions to history searcher callback

history-searcher
TorchedSammy 2022-07-17 18:22:00 -04:00
parent 001bd15ced
commit 3dae826578
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ func (g *CompletionGroup) updateTabFind(rl *Instance) {
if rl.searchMode != HistoryFind {
g.Suggestions = g.filterSuggestions(rl)
} else {
g.Suggestions = rl.HistorySearcher(string(rl.tfLine))
g.Suggestions = rl.HistorySearcher(string(rl.tfLine), g.Suggestions)
}
// Finally, the group computes its new printing settings

View File

@ -201,7 +201,7 @@ type Instance struct {
RawInputCallback func([]rune) // called on all input
HistorySearcher func(string) []string
HistorySearcher func(string, []string) []string
}
// NewInstance is used to create a readline instance and initialise it with sane defaults.