aerc/filters/plaintext
Robin Jarry 3ef4a3ca05 filters: try and make awk scripts posix compliant
\x escape sequences are GNU specific. Use the octal escape code instead.

filters/calendar is beyond help. It would need a complete rewrite to
make it work with POSIX awk.

Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
2022-07-18 13:58:21 +02:00

18 lines
242 B
Awk
Executable file

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