aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msgview/save.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msgview/save.go')
-rw-r--r--commands/msgview/save.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/commands/msgview/save.go b/commands/msgview/save.go
index 59d94b2f..93fa83f8 100644
--- a/commands/msgview/save.go
+++ b/commands/msgview/save.go
@@ -16,19 +16,31 @@ import (
"github.com/mitchellh/go-homedir"
)
+type Save struct{}
+
func init() {
- register("save", Save)
+ register(Save{})
+}
+
+func (_ Save) Aliases() []string {
+ return []string{"save"}
+}
+
+func (_ Save) Complete(aerc *widgets.Aerc, args []string) []string {
+ return nil
}
-func Save(aerc *widgets.Aerc, args []string) error {
+func (_ Save) Execute(aerc *widgets.Aerc, args []string) error {
opts, optind, err := getopt.Getopts(args, "p")
if err != nil {
return err
}
+
var (
mkdirs bool
path string
)
+
for _, opt := range opts {
switch opt.Option {
case 'p':