blob: 26c96314e0afc0b5665fe39e8f62d21db8ca4db7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package commands
import (
"git.sr.ht/~rjarry/aerc/widgets"
)
type NewAccount struct {
Temp bool `opt:"-t"`
}
func init() {
register(NewAccount{})
}
func (NewAccount) Aliases() []string {
return []string{"new-account"}
}
func (NewAccount) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (n NewAccount) Execute(aerc *widgets.Aerc, args []string) error {
wizard := widgets.NewAccountWizard(aerc)
wizard.ConfigureTemporaryAccount(n.Temp)
wizard.Focus(true)
aerc.NewTab(wizard, "New account")
return nil
}
|