aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/compose/cc-bcc.go6
-rw-r--r--commands/msg/forward.go6
2 files changed, 10 insertions, 2 deletions
diff --git a/commands/compose/cc-bcc.go b/commands/compose/cc-bcc.go
index d54a9895..92f792f1 100644
--- a/commands/compose/cc-bcc.go
+++ b/commands/compose/cc-bcc.go
@@ -6,7 +6,7 @@ import (
)
type CC struct {
- Recipients string `opt:"recipients"`
+ Recipients string `opt:"recipients" complete:"CompleteAddress"`
}
func init() {
@@ -21,6 +21,10 @@ func (CC) Aliases() []string {
return []string{"cc", "bcc"}
}
+func (*CC) CompleteAddress(arg string) []string {
+ return commands.GetAddress(arg)
+}
+
func (c CC) Execute(args []string) error {
composer, _ := app.SelectedTabContent().(*app.Composer)
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")