aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/forward.go6
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")