| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some distro packages install binaries in /usr/bin that clash with some
of aerc's builtin filters (for example, colorize and wrap). The issue is
that aerc filters dir (usually /usr/libexec/aerc/filters) is *after*
/usr/bin, making the builtin filters not accessible when these distro
packages are installed.
Since this mostly concerns colorize and wrap, move $LIBEXEC/aerc/filters
at the beginning of the exec PATH when running filter commands. If the
intent is **really** to execute /usr/bin/colorize or /usr/bin/html, then
their absolute paths should be used.
Link: https://archlinux.org/packages/extra/x86_64/talkfilters/
Link: https://tracker.debian.org/pkg/colorize
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tristan Partin <tristan@partin.io>
|
|
|
|
|
|
|
|
| |
Add AERC_ACCOUNT and AERC_FOLDER to the environment of the mail-received
hook command.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tristan Partin <tristan@partin.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a default ? bind in the global context to show the current key
bindings. It is completely useless in the wizard context and prevents
users from typing ? if this character is in their password.
Disable globals in the wizard bindings (equivalent of $noinherit=true).
Reported-by: Brad <super1337@posteo.net>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attach a file from templates. Add a split template function.
{{- .Attach "LICENSE" -}}
or
{{range (exec "find ./doc -type f -name *.scd" "" | split "\n") -}}
{{with . }}
{{- $.Attach . -}}
{{- end}}
{{- end}}
Fixes: https://todo.sr.ht/~rjarry/aerc/109
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
<C-PgDn> was defined twice in the [compose::editor] context.
I changed one of the definitions to a proper <C-PgUp> one.
Signed-off-by: Anton Mosich <anton@mosich.at>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Implement embedded header mode in the composer widget. To activate it,
use set [compose].edit-headers=true in aerc.conf.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
| |
Add a style for folded threads. Use msglist_thread_folded in the
stylesheet like "msglist_thread_folded.dim = true"
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Tested-by: inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the number of threads and a flag to indicated folded threads to the
template data. Use {{.ThreadCount}} and {{.ThreadFolded}} in template
expression for the message list.
column-subject = {{.ThreadPrefix}}{{if .ThreadFolded}}[{{.ThreadCount}}] {{end}}{{.Subject}}
Update default configuration accordingly.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
| |
Add the :fold and :unfold commands to perform thread folding. They only
work on the selected message. Add vim-like bindings.
Fixes: https://todo.sr.ht/~rjarry/aerc/148
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The wizard constructs an AccountConfig object by hand without
initializing default values. This causes a crash when replying to an
email (rr) just after completing the account creation:
~/.config/aerc/aerc.conf not found, installing the system default~/.config/aerc/binds.conf not found, installing the system defaultpanic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x5d1550]
...
regexp.(*Regexp).doExecute(0x7fc1089aa108?, {0x0?, 0x0?}, {0x0?, 0x0?, 0xc000fe5408?}, {0xc000698120?, 0x10?}, 0xad3a40?, 0x2, ...)
regexp/exec.go:527 +0x90
regexp.(*Regexp).FindString(0x44e372?, {0xc000698120, 0x27})
regexp/regexp.go:852 +0x6c
git.sr.ht/~rjarry/aerc/commands/msg.trimLocalizedRe({0xc000698120, 0x27}, 0xc00003e420?)
git.sr.ht/~rjarry/aerc/commands/msg/reply.go:332 +0x36
git.sr.ht/~rjarry/aerc/commands/msg.reply.Execute({}, 0xc0002ba180, {0xc0002f8800?, 0x2, 0x2})
git.sr.ht/~rjarry/aerc/commands/msg/reply.go:157 +0x765
...
Extract the account parsing and initialization into a function. Reuse
that function in both accounts.conf parsing and the wizard.
Fixes: 40cc540357d9 ("reply: allow to override localized Re regexp in configuration")
Reported-by: Mechiel Lukkien <mechiel@ueber.net>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Andrew Yu <andrew@andrewyu.org>
|
|
|
|
|
|
|
|
|
|
| |
Documentation above no-attachment-warning states
"Leave empty to disable this feature".
However, when left empty, it would always warn before sending an email
without any attachments. Change to no warning if left empty.
Signed-off-by: Nojus Gudinavičius <nojus.gudinavicius@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
These are from my own config. They may be helpful to others.
Remove "q" to quit from the message list without confirmation. Add
<ctrl-c> and <ctrl-q> to quit from any context.
Suggested-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
| |
/usr/libexec was not listed in the default search $PATH. Add it to match
the man page.
Fixes: 04303172d4f9 ("filters: install them in $PREFIX/libexec/aerc/filters")
Signed-off-by: Sebastian LaVine <mail@smlavine.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Similar to switch and .StyleSwitch, add map and .StyleMap to work on
lists. An extra "exclude" item is available to filter elements out of
the list.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
|
|
|
|
|
|
|
|
| |
Add `<backspace>` option to bindings, so it can be used to leave the
message view similar to some file managers.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a user sets multiple dynamic styles, only the first one is applied.
The parsing function is modifying the matching pattern prior to saving
it to the style. When a second occurrence of the same dynamic style is
seen, the patterns don't match because we compare against the raw user
input instead of the modified pattern value. Store the raw user input as
the pattern instead of our modified regex.
Fixes: 2f46f64b0b0b ("styleset: allow dynamic msglist styling")
Reported-by: Drew Devault <sir@cmpwn.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Drew Devault <sir@cmpwn.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
This was a bad copy paste from config/ui.go.
Fixes: d2e74cdb91e1 ("statusline: add column based render format")
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow accessing email flags via boolean properties instead of having to
rely on obscure regular expressions on (.Flags | join ""). With this
patch, it is now possible to do this:
[ui]
index-columns = star:1,name<15%,reply:1,subject,size>=,date>=
column-star = {{if .IsFlagged}}★{{end}}
column-name = {{if eq .Role "sent"}}{{.To | names | join ", "}}{{else}}{{.From | names | join ", "}}{{end}}
column-reply = {{if .IsReplied}}{{end}}
column-subject = {{.ThreadPrefix}}{{.Subject}}
column-size = {{if .HasAttachment}}📎 {{end}}{{humanReadable .Size}}
column-date = {{.DateAutoFormat .Date.Local}}
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Koni Marti <koni.marti@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable partial header fetching by creating config values for headers to
specifically include, or specifically exclude. The References field will
always be fetched, regardless of the include list. Envelope data is
always fetched, but is not shown with :toggle-headers, since it isn't in
the RFC822 struct unless explicitly included in the list.
Partial headers can break the cache on changes. Update the cache tag key
to include the state of the partially-fetched headers.
Partial header fetching can have a significant performance increase for
IMAP, and for all backends a resource improvement. Some data to support
this is below. Gathered by opening aerc, selecting a mailbox with
approximately 800 messages and scrolling to the end.
Received measured with nethogs, RAM from btop
Received | RAM
-------------------------------------
All Headers | 9,656 kb | 103 MB
Minimum Headers | 896 kb | 36 MB
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Since aercs embedded terminal now behaves correctly, a messages contents
are at the bottom of the pager by default, this has already sparked
confusion as this is uncommon and not matching previous behaviour.
Thanks: Stacy Harper <contact@stacyharper.net>
Suggested-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Ask user whether they want to abort before sending if the subject header
is empty and they have enabled the warn-empty-subject config option.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Add config options for setting the TERM environment variable used in
tcell-term and for enabling or disabling OSC8 escape sequence output.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry<robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Add .Role as a template field for use in distinguishing between
mailboxes with a given IANA role, or custom role defined by aerc
("query" for notmuch queries, for example).
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry<robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The stylesets are parsed in two passes. The first pass skips the
.selected keys and updates the attributes and colors of both the objects
and selected maps. The second pass is supposed to only update the
selected map of the pointed style objects.
The boolean logic was incorrect, the .selected styles were applied on
normal objects as well which led to confusing behaviour most
specifically when using *.selected.toggle=true.
Properly parse .selected elements.
Fixes: 47675e80850d ("config: rework styleset parsing")
Reported-by: John Mcenroy <handplanet@outlook.com>
Reported-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Kirill Chibisov <contact@kchibisov.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the user has several accounts with smtp-starttls=yes set, they will
be warned multiple times for each account. This is confusing and may let
the user believe that aerc is stuck because closing the dialog seems to
have no effect.
Only warn once.
Fixes: c09b17a930cc ("smtp: replace smtp-starttls with schema option")
Reported-by: Inwit <inwit@sindominio.net>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
| |
Add a hook to run when aerc shuts down. The environment is supplemented
with the duration aerc was alive for.
References: https://todo.sr.ht/~rjarry/aerc/136
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a hook to run when aerc starts up. The environment is supplemented
with aerc version and the path to its binary.
References: https://todo.sr.ht/~rjarry/aerc/136
References: https://todo.sr.ht/~rjarry/aerc/139
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecate triggers and replace them with hooks. Now that aerc supports
running arbitrary ex commands over IPC, it is possible to run internal
aerc commands *and* shell commands via external shell scripts. Hooks
only allow running shell commands. Hooks info is passed via environment
variables.
Implements: https://todo.sr.ht/~rjarry/aerc/136
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
| |
We have been wanting to remove this for a while now. The only use case
is styleset and changing the whole styleset based on an email subject
does not make much sense. The same feature can be achieve with dynamic
msglist* styles based on any email header value in the stylesets now.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for dynamic msglist*.$HEADER,$VALUE.$ATTR = $VALUE where
$VALUE can be either a fixed string or a regular expression. This is
intended as a replacement of contextual ui sections based on subject
values.
Implements: https://todo.sr.ht/~rjarry/aerc/18
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
| |
Simplify code. Prepare for dynamic styling of the message list.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
| |
Inherit from the lower layers colors unless explicitly overridden in
upper layers.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When accounts.conf cannot be parsed, return an error instead of assuming
that the file is non existent and wrongfully opening the new account
wizard. Use the same ini delimiters for all configuration files.
Fixes: https://todo.sr.ht/~rjarry/aerc/151
Reported-by: Jon Fineman <jon@fineman.me>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
| |
The "smtp-starttls" options is now ignored in favor of more detailed
schema specification, similarly to IMAP.
Fixes: https://todo.sr.ht/~rjarry/aerc/149
Signed-off-by: Marcin Serwin <marcin.serwin0@protonmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
The default value should be true as stated in the docs.
Fixes: b63c93563c62 ("config: use reflection to map ini keys to struct fields")
Reported-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Kirill Chibisov <contact@kchibisov.com>
|
|
|
|
|
|
|
| |
Allow wild cards for MIME types like in filters.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
| |
Provide a way to configure link openers. Based on the URL mime type:
x-scheme-handler/$scheme.
Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add .StyleSwitch that takes a string and an arbitrary number of cases
(regexp, style). Reuse some of the constructs introduced by previous
commit.
The style of the first regular expression that matches will be applied.
If the string does not match any of the expressions, it will be left
as-is.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Document .SubjectBase. Fix its value along the way. Do not reuse
d.Subject() which may be empty if d.threadSameSubject is true.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
| |
Extract {{.ThreadPrefix}} from {{.Subject}} so that the prefix can be
styled in a different color.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using {{.Style "foo" bar}} and "foo" is not defined in the styleset
under the [user] section, there is an obscure error:
template: column-right:1:18: executing "column-right" at <.Style>:
error calling Style: runtime error: invalid memory address or nil
pointer dereference
Which is most of the time truncated and can only be read in logs.
Referencing an undefined style is not a serious problem. Return the
default tcell style in that case and avoid the error.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to make automation easier, it's useful to be able to send
commands to aerc via IPC. This can be done by calling the aerc binary
followed by a colon and the command to run. For example:
aerc :read && aerc :remark && aerc :archive month
Security to ensure no malicious commands are run is deferred to the
user. By default the socket is only writable by the user. This is
considered sufficient as the potential harm an attacker gaining
write-access to a user's session can cause is significantly greater than
"can delete some emails".
To ensure users with an according threat model, it is possible to
disable command IPC. mailto-handling is unaffected even though it works
over IPC as it is absolutely non-destructive.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default ini.Section.MapTo() function only handles basic types.
Implement a more complete mapping solution that allows:
* parsing templates, regexps, email addresses
* defining a custom parsing method via the `parse:"MethodName"` tag
* defining default values via the `default:"value"` tag
* parsing rune values with the `type:"rune"` tag
The field name must be specified in the `ini:"field-name"` tag as it was
before. It is no longer optional.
The `delim:"<separator>"` tag remains but can only be used to parse
string arrays.
It is now possible to override default values with "zero" values. For
example:
[ui]
dirlist-delay = 0
Will override the default "200ms" value. Also:
[statusline]
status-columns =
Will override the default "left<*,center>=,right>*" value.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow custom user-defined styles in a styleset. The styles can take any
name, and must be under the [user] ini section. All attributes apply to
user defined styles.
Example:
[user]
red.fg=red
red.bold=true
Add a .Style function which accepts the name of a user-defined style and
applies it to the string.
{{.Style "red" "foo"}}
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not store the dependency in tools.go as there may be conflicts with
some indirect dependencies of aerc.
Run gofumpt and golangci-lint from their latest tagged release. This
should fix issues with go 1.20. Bonus, it drains a bit of fat from
go.sum.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
strings.SplitN is not like python str.split() method... It requires an
exact number of items including the trailing non split part.
Add unit tests to ensure it works.
Fixes: 6cfbc87d8ab0 ("dirlist: use templates instead of % mini language")
Reported-by: John Mcenroy <handplanet@outlook.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Ben Lee-Cohen <ben@lee-cohen.com>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
|
|
|
|
|
|
| |
When running :toggle-headers, pipe the output in colorize by default.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace dirlist-format with two settings: dirlist-left & dirlist-right.
These two settings take aerc-templates(7) and may be left empty.
Add automatic translation of dirlist-format to these new settings.
Display a warning on startup if dirlist-format has been converted.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the spirit of commit 535300cfdbfc ("config: add columns based index
format"), reuse the column definitions and table widget.
Add automatic translation of render-format to column definitions. Allow
empty columns to be compatible with the %m (mute) flag.
Rename the State object to AccountState to be more precise. Reuse that
object in state.TempateData to expose account state info. Move actual
status line rendering in StatusLine.Draw().
Add new template fields for status specific data:
{{.ConnectionInfo}}
Connection state.
{{.ContentInfo}}
General status information (e.g. filter, search)
{{.StatusInfo}}
Combination of {{.ConnectionInfo}} and {{.StatusInfo}}
{{.TrayInfo}}
General on/off information (e.g. passthrough, threading,
sorting)
{{.PendingKeys}}
Currently pressed key sequence that does not match any key
binding and/or is incomplete.
Display a warning on startup if render-format has been converted to
status-columns.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since previous commit, all commands now support expanding text/template
markup. Reuse that for the new-email trigger command.
Update commands.ExecuteCommand to take optional *AccountConfig and
*MessageInfo arguments. If these are nil, fallback to using the
currently selected account and message (if any).
Pass the proper *AccountConfig and *MessageInfo objects when firing the
trigger command so that these are used instead of the currently selected
ones.
If new-email contains % placeholders, try to convert them to template
markup reusing the same conversion added in commit 535300cfdbfc
("config: add columns based index format"). Warn the user that they need
to update their configuration file.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
|