summary refs log tree commit diff stats
path: root/aerc.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-10 21:15:24 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-10 21:15:24 -0400
commitb60999c39e11bf4d1e236f2b10a2f895b44d23fb (patch)
tree8ce8023277815a7d1f25dc7c48fa910c698d5b1b /aerc.go
parent62862d8a9e7f684bc3ff4e9ea115678ff44d8644 (diff)
downloadaerc-b60999c39e11bf4d1e236f2b10a2f895b44d23fb.tar.gz
Start building out command subsystem
Diffstat (limited to 'aerc.go')
-rw-r--r--aerc.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/aerc.go b/aerc.go
index 3bdc90a..1e2f884 100644
--- a/aerc.go
+++ b/aerc.go
@@ -10,6 +10,7 @@ import (
 	"github.com/mattn/go-isatty"
 
 	"git.sr.ht/~sircmpwn/aerc2/config"
+	"git.sr.ht/~sircmpwn/aerc2/commands"
 	libui "git.sr.ht/~sircmpwn/aerc2/lib/ui"
 	"git.sr.ht/~sircmpwn/aerc2/widgets"
 )
@@ -32,7 +33,12 @@ func main() {
 		panic(err)
 	}
 
-	ui, err := libui.Initialize(conf, widgets.NewAerc(conf, logger))
+	var aerc *widgets.Aerc
+	aerc = widgets.NewAerc(conf, logger, func(cmd string) error {
+		return commands.ExecuteCommand(aerc, cmd)
+	})
+
+	ui, err := libui.Initialize(conf, aerc)
 	if err != nil {
 		panic(err)
 	}