From dee1adce3f6ac9ba889fca89561231408e251aaa Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Fri, 28 Jul 2023 21:35:35 +0200 Subject: filters: put libexec/filters dirs before default PATH 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 Reviewed-by: Tristan Partin --- doc/aerc-config.5.scd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/aerc-config.5.scd') diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd index 0cdad99b..e420d52c 100644 --- a/doc/aerc-config.5.scd +++ b/doc/aerc-config.5.scd @@ -664,7 +664,7 @@ _/usr/libexec/aerc/filters_). Note that these may have additional dependencies that aerc does not have alone. The filter commands are invoked with _sh -c command_. The following folders are -appended to the system *$PATH* to allow referencing filters from their name only. +prepended to the system *$PATH* to allow referencing filters from their name only. ``` ${XDG_CONFIG_HOME:-~/.config}/aerc/filters @@ -676,6 +676,9 @@ $PREFIX/share/aerc/filters /usr/share/aerc/filters ``` +If you want to run a program in your default *$PATH* which has the same +name as a builtin filter (e.g. _/usr/bin/colorize_), use its absolute path. + The following variables are defined in the filter command environment: *AERC_MIME_TYPE* -- cgit