From 6811143925384ba1cfda8b3e1b338b0cfb9ac6e3 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 21 May 2019 16:31:04 -0400 Subject: New account wizard, part one --- commands/new-account.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 commands/new-account.go (limited to 'commands') 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 +} -- cgit v1.2.3