aerc/filters/plaintext
Robin Jarry 9dc2803220 filters: restore plaintext awk script
This script is referenced by some users configuration. Restore it to
avoid breaking existing setups.

Fixes: bca93cd915 ("filters: add a more complete plaintext filter")
Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-02-20 23:46:29 +01:00

17 lines
243 B
Awk
Executable file

# vim: set ft=awk :
BEGIN {
dim = "\x1B[2m"
cyan = "\x1B[36m"
reset = "\x1B[0m"
}
{
# Strip carriage returns from line
gsub(/\r/, "", $0)
if ($0 ~ /^On .*, .* wrote:/ || $0 ~ /^>+/) {
print dim cyan $0 reset
} else {
print $0
}
}