From d0484b153aa5fa80c415f4025aef493eba167e12 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Sat, 12 Oct 2024 00:21:46 +0200 Subject: completion: add command option descriptions Add `desc:""` struct field tags in all command arguments where it makes sense. The description values will be returned along with 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/msg/archive.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands/msg/archive.go') diff --git a/commands/msg/archive.go b/commands/msg/archive.go index 0b4b8258..eb143b34 100644 --- a/commands/msg/archive.go +++ b/commands/msg/archive.go @@ -22,8 +22,8 @@ const ( var ARCHIVE_TYPES = []string{ARCHIVE_FLAT, ARCHIVE_YEAR, ARCHIVE_MONTH} type Archive struct { - MultiFileStrategy *types.MultiFileStrategy `opt:"-m" action:"ParseMFS" complete:"CompleteMFS"` - Type string `opt:"type" action:"ParseArchiveType" metavar:"flat|year|month" complete:"CompleteType"` + MultiFileStrategy *types.MultiFileStrategy `opt:"-m" action:"ParseMFS" complete:"CompleteMFS" desc:"Multi-file strategy."` + Type string `opt:"type" action:"ParseArchiveType" metavar:"flat|year|month" complete:"CompleteType" desc:"Archiving scheme."` } func (a *Archive) ParseMFS(arg string) error { -- cgit