[neomutt-users] Search and Replace for viewing Mail
florian at whnr.de
Fri Mar 15 15:40:48 CET 2019
>> ... search and replace on e-mail bodies in the pager
>Sounds like you want $display_filter
>Here's a sample to eliminate the letter 'e' from your email :-)
> set display_filter="sed 's/e//g'"
Thank you! That's it. I just could not find it in the docs. What I
really needed was: `sed -E 's/[aeiou]/a/g'` => great fun for 3 minutes
Just as a reference, here is what I have in my neomuttrc now. And just
to be sure: I know, that the URL and E-Mail regexes are very weak. But
it's enough for everything I have seen so far.
# Stripping URLs and extra e-mail parameters from the displayed text
# Backslashes must be double escaped in neomutt variables!
set display_filter="sed -E -e 's/https?:\\/\\/[^ \\n\\r\\t]+\\b/\\[url\\]/g' \
color body color9 default "\\[url\\]"
More information about the neomutt-users