diff options
author | Robin Jarry <robin@jarry.cc> | 2022-11-09 20:38:59 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-11-13 17:13:44 +0100 |
commit | 76002741072a61d1adcf97f708a3db9d544b27de (patch) | |
tree | 1d787b85f215340fbe5b47635df3ff6df3cb7312 /widgets/msgviewer.go | |
parent | 419d67fc6822651e9a0fa9a65698799fabc9ac87 (diff) | |
download | aerc-76002741072a61d1adcf97f708a3db9d544b27de.tar.gz |
filters: export more info to filter processes
Export some more environment variables to the pager commands.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Koni Marti <koni.marti@gmail.com>
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r-- | widgets/msgviewer.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index d168f456..4006e25b 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -595,6 +595,14 @@ func NewPartViewer(acct *AccountView, conf *config.AercConfig, fmt.Sprintf("AERC_MIME_TYPE=%s", mime)) filter.Env = append(filter.Env, fmt.Sprintf("AERC_FILENAME=%s", part.FileName())) + if flowed, ok := part.Params["format"]; ok { + filter.Env = append(filter.Env, + fmt.Sprintf("AERC_FORMAT=%s", flowed)) + } + filter.Env = append(filter.Env, + fmt.Sprintf("AERC_SUBJECT=%s", info.Envelope.Subject)) + filter.Env = append(filter.Env, fmt.Sprintf("AERC_FROM=%s", + format.FormatAddresses(info.Envelope.From))) if pagerin, err = pager.StdinPipe(); err != nil { return nil, err } |