diff options
author | Robin Jarry <robin@jarry.cc> | 2024-06-23 22:49:35 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-06-25 00:29:51 +0200 |
commit | 9cd806fa6e80829753ecd3356e19044d6e210826 (patch) | |
tree | 23360978b1ba0cb0e9dc2bfd7bc9b9c51ceba96f /commands/msg/forward.go | |
parent | 37ddad48770fe5e2f98c03bfc4692a59cd6d4a16 (diff) | |
download | aerc-9cd806fa6e80829753ecd3356e19044d6e210826.tar.gz |
cc,bcc,forward: add completion from address book
Allow using the address book for completion in the :cc, :bcc and
:forward commands.
Changelog-added: The address book is now used for `:cc`, `:bcc` and
`:forward`.
Requested-by: Maximilian Bosch <maximilian@mbosch.me>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Tested-by: Maximilian Bosch <maximilian@mbosch.me>
Diffstat (limited to 'commands/msg/forward.go')
-rw-r--r-- | commands/msg/forward.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go index ff5dbde7..2f108e8e 100644 --- a/commands/msg/forward.go +++ b/commands/msg/forward.go @@ -30,7 +30,7 @@ type forward struct { Edit bool `opt:"-e"` NoEdit bool `opt:"-E"` Template string `opt:"-T" complete:"CompleteTemplate"` - To []string `opt:"..." required:"false"` + To []string `opt:"..." required:"false" complete:"CompleteTo"` } func init() { @@ -49,6 +49,10 @@ func (*forward) CompleteTemplate(arg string) []string { return commands.GetTemplates(arg) } +func (*forward) CompleteTo(arg string) []string { + return commands.GetAddress(arg) +} + func (f forward) Execute(args []string) error { if f.AttachAll && f.AttachFull { return errors.New("Options -A and -F are mutually exclusive") |