From ebfd2a9da3d63390a9d4a0c227b2513a0dac19a4 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Thu, 13 Oct 2022 00:03:42 +0200 Subject: filters: export mime type and filename in env Export AERC_MIME_TYPE and AERC_FILENAME in the filters command environment. This allows dynamic coloring with tools that require a filename and/or a mime type to determine the syntax. Update docs and add example use in the default config file. Signed-off-by: Robin Jarry Acked-by: Moritz Poldrack --- doc/aerc-config.5.scd | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index 9be0cb27..2c5f809d 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -520,6 +520,13 @@ $PREFIX/share/aerc/filters /usr/share/aerc/filters ``` +The following variables are defined in the filter command environment: + +_AERC_MIME_TYPE_ + the part MIME type/subtype +_AERC_FILENAME_ + the attachment filename (if any) + Note that said email body is converted into UTF-8 before being passed to filters. -- cgit