summary refs log tree commit diff stats
path: root/commands/account/next-folder.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/account/next-folder.go')
-rw-r--r--commands/account/next-folder.go19
1 files changed, 14 insertions, 5 deletions
diff --git a/commands/account/next-folder.go b/commands/account/next-folder.go
index 6ad3d54..414e606 100644
--- a/commands/account/next-folder.go
+++ b/commands/account/next-folder.go
@@ -8,16 +8,21 @@ import (
 	"git.sr.ht/~sircmpwn/aerc/widgets"
 )
 
+type NextPrevFolder struct{}
+
 func init() {
-	register("next-folder", NextPrevFolder)
-	register("prev-folder", NextPrevFolder)
+	register(NextPrevFolder{})
 }
 
-func nextPrevFolderUsage(cmd string) error {
-	return errors.New(fmt.Sprintf("Usage: %s [n]", cmd))
+func (_ NextPrevFolder) Aliases() []string {
+	return []string{"next-folder", "prev-folder"}
+}
+
+func (_ NextPrevFolder) Complete(aerc *widgets.Aerc, args []string) []string {
+	return nil
 }
 
-func NextPrevFolder(aerc *widgets.Aerc, args []string) error {
+func (_ NextPrevFolder) Execute(aerc *widgets.Aerc, args []string) error {
 	if len(args) > 2 {
 		return nextPrevFolderUsage(args[0])
 	}
@@ -44,3 +49,7 @@ func NextPrevFolder(aerc *widgets.Aerc, args []string) error {
 	}
 	return nil
 }
+
+func nextPrevFolderUsage(cmd string) error {
+	return errors.New(fmt.Sprintf("Usage: %s [n]", cmd))
+}