aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/new-account.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/commands/new-account.go b/commands/new-account.go
new file mode 100644
index 0000000..6a64eb2
--- /dev/null
+++ b/commands/new-account.go
@@ -0,0 +1,20 @@
+package commands
+
+import (
+ "errors"
+
+ "git.sr.ht/~sircmpwn/aerc/widgets"
+)
+
+func init() {
+ register("new-account", CommandNewAccount)
+}
+
+func CommandNewAccount(aerc *widgets.Aerc, args []string) error {
+ if len(args) != 1 {
+ return errors.New("Usage: new-account")
+ }
+ wizard := widgets.NewAccountWizard()
+ aerc.NewTab(wizard, "New account")
+ return nil
+}