diff options
author | Robin Jarry <robin@jarry.cc> | 2023-10-30 21:05:56 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-11-02 11:59:39 +0100 |
commit | 2dfeb7130a8fb97d927a55efa738f110f46cb688 (patch) | |
tree | cca6a06999d2be32f01e4ac6ae2998c5f24c2895 /commands/account/search.go | |
parent | faa879f9a84d44f9b251410fc923a827a44df1a7 (diff) | |
download | aerc-2dfeb7130a8fb97d927a55efa738f110f46cb688.tar.gz |
completion: refactor filter list api
Remove CompletionFromList which is a trivial wrapper around FilterList.
Remove the prefix, suffix and isFuzzy arguments from FilterList.
Replace prefix, suffix by an optional callback to allow post processing
of completion results before presenting them to the user.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'commands/account/search.go')
-rw-r--r-- | commands/account/search.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/account/search.go b/commands/account/search.go index ca1b9684..10481e8e 100644 --- a/commands/account/search.go +++ b/commands/account/search.go @@ -42,15 +42,15 @@ func (SearchFilter) Aliases() []string { } func (*SearchFilter) CompleteFlag(arg string) []string { - return commands.CompletionFromList(commands.GetFlagList(), arg) + return commands.FilterList(commands.GetFlagList(), arg, commands.QuoteSpace) } func (*SearchFilter) CompleteAddress(arg string) []string { - return commands.CompletionFromList(commands.GetAddress(arg), arg) + return commands.FilterList(commands.GetAddress(arg), arg, commands.QuoteSpace) } func (*SearchFilter) CompleteDate(arg string) []string { - return commands.CompletionFromList(commands.GetDateList(), arg) + return commands.FilterList(commands.GetDateList(), arg, commands.QuoteSpace) } func (s *SearchFilter) ParseRead(arg string) error { |