From 26033eaecfe6733b2f911dea283433df11773256 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Sat, 12 Oct 2024 00:21:45 +0200 Subject: completion: add commands descriptions Update the Command interface to include a Description() method. Implement the method for all commands using short descriptions inspired from the aerc(1) man page. Return the description values along with command names so that they can be displayed in completion choices. Implements: https://todo.sr.ht/~rjarry/aerc/271 Signed-off-by: Robin Jarry Tested-by: Bojan Gabric Tested-by: Jason Cox Acked-by: Tim Culverhouse --- commands/account/clear.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'commands/account/clear.go') diff --git a/commands/account/clear.go b/commands/account/clear.go index ec033c46..e16b563a 100644 --- a/commands/account/clear.go +++ b/commands/account/clear.go @@ -16,6 +16,10 @@ func init() { commands.Register(Clear{}) } +func (Clear) Description() string { + return "Clear the current search or filter criteria." +} + func (Clear) Context() commands.CommandContext { return commands.MESSAGE_LIST } -- cgit