From 2a0961701c4cabecc53d134ed1782e5612e64580 Mon Sep 17 00:00:00 2001 From: Gregory Mullen Date: Thu, 27 Jun 2019 10:33:11 -0700 Subject: Implement basic tab completion support Tab completion currently only works on commands. Contextual completion will be added in the future. --- commands/account/search.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'commands/account/search.go') diff --git a/commands/account/search.go b/commands/account/search.go index 513ad439..a8640dcc 100644 --- a/commands/account/search.go +++ b/commands/account/search.go @@ -9,12 +9,21 @@ import ( "git.sr.ht/~sircmpwn/aerc/widgets" ) +type SearchFilter struct{} + func init() { - register("search", SearchFilter) - //register("filter", SearchFilter) // TODO + register(SearchFilter{}) +} + +func (_ SearchFilter) Aliases() []string { + return []string{"search"} +} + +func (_ SearchFilter) Complete(aerc *widgets.Aerc, args []string) []string { + return nil } -func SearchFilter(aerc *widgets.Aerc, args []string) error { +func (_ SearchFilter) Execute(aerc *widgets.Aerc, args []string) error { var ( criteria *imap.SearchCriteria = imap.NewSearchCriteria() ) -- cgit