Add Templates with Parsing
+ Changes NewComposer to return error. + Add lib to handle templates using "text/template". + Add -T option to following commands - compose. - reply - forward + Quoted replies using templates. + Forwards as body using templates + Default templates are installed similar to filters. + Templates Config in aerc.conf. - Required templates are parsed while loading config. + Add aerc-templates.7 manual for using template data.
This commit is contained in:
parent
ad68a9e4e4
commit
3ba69edab5
14 changed files with 510 additions and 143 deletions
commands/msg
|
@ -87,13 +87,17 @@ func unsubscribeMailto(aerc *widgets.Aerc, u *url.URL) error {
|
|||
"To": u.Opaque,
|
||||
"Subject": u.Query().Get("subject"),
|
||||
}
|
||||
composer := widgets.NewComposer(
|
||||
composer, err := widgets.NewComposer(
|
||||
aerc,
|
||||
aerc.Config(),
|
||||
acct.AccountConfig(),
|
||||
acct.Worker(),
|
||||
"",
|
||||
defaults,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
composer.SetContents(strings.NewReader(u.Query().Get("body")))
|
||||
tab := aerc.NewTab(composer, "unsubscribe")
|
||||
composer.OnHeaderChange("Subject", func(subject string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue