diff options
author | Robin Jarry <robin@jarry.cc> | 2024-10-12 00:21:46 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-10-23 10:22:51 +0200 |
commit | d0484b153aa5fa80c415f4025aef493eba167e12 (patch) | |
tree | 663b4d52d6f7e070477963346e3e3699eca8c384 /commands/msgview | |
parent | 26033eaecfe6733b2f911dea283433df11773256 (diff) | |
download | aerc-d0484b153aa5fa80c415f4025aef493eba167e12.tar.gz |
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 <robin@jarry.cc>
Tested-by: Bojan Gabric <bojan@bojangabric.com>
Tested-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'commands/msgview')
-rw-r--r-- | commands/msgview/open.go | 2 | ||||
-rw-r--r-- | commands/msgview/save.go | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/commands/msgview/open.go b/commands/msgview/open.go index 7b23423d..4293b7e4 100644 --- a/commands/msgview/open.go +++ b/commands/msgview/open.go @@ -14,7 +14,7 @@ import ( ) type Open struct { - Delete bool `opt:"-d"` + Delete bool `opt:"-d" desc:"Delete temp file after the opener exits."` Cmd string `opt:"..." required:"false"` } diff --git a/commands/msgview/save.go b/commands/msgview/save.go index 0310ed0e..349a8233 100644 --- a/commands/msgview/save.go +++ b/commands/msgview/save.go @@ -18,11 +18,11 @@ import ( ) type Save struct { - Force bool `opt:"-f"` - CreateDirs bool `opt:"-p"` - Attachments bool `opt:"-a"` - AllAttachments bool `opt:"-A"` - Path string `opt:"path" required:"false" complete:"CompletePath"` + Force bool `opt:"-f" desc:"Overwrite destination path."` + CreateDirs bool `opt:"-p" desc:"Create missing directories."` + Attachments bool `opt:"-a" desc:"Save all attachments parts."` + AllAttachments bool `opt:"-A" desc:"Save all named parts."` + Path string `opt:"path" required:"false" complete:"CompletePath" desc:"Target file path."` } func init() { |