aerc/commands/account/compose.go

29 lines
549 B
Go
Raw Normal View History

2019-05-12 04:06:09 +00:00
package account
import (
"errors"
"github.com/mattn/go-runewidth"
"git.sr.ht/~sircmpwn/aerc2/widgets"
)
func init() {
register("compose", Compose)
}
// TODO: Accept arguments for default headers, message body
func Compose(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: compose")
}
// TODO: Pass along the sender info
composer := widgets.NewComposer()
// TODO: Change tab name when message subject changes
aerc.NewTab(composer, runewidth.Truncate(
"New email", 32, "…"))
return nil
}