aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rwxr-xr-xfilters/plaintext16
2 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 58e51b27..58ffc165 100644
--- a/Makefile
+++ b/Makefile
@@ -92,6 +92,7 @@ install: $(DOCS) aerc
install -m755 filters/colorize $(DESTDIR)$(SHAREDIR)/filters/colorize
install -m755 filters/hldiff $(DESTDIR)$(SHAREDIR)/filters/hldiff
install -m755 filters/html $(DESTDIR)$(SHAREDIR)/filters/html
+ install -m755 filters/plaintext $(DESTDIR)$(SHAREDIR)/filters/plaintext
install -m644 templates/new_message $(DESTDIR)$(SHAREDIR)/templates/new_message
install -m644 templates/quoted_reply $(DESTDIR)$(SHAREDIR)/templates/quoted_reply
install -m644 templates/forward_as_body $(DESTDIR)$(SHAREDIR)/templates/forward_as_body
diff --git a/filters/plaintext b/filters/plaintext
new file mode 100755
index 00000000..cfaa170e
--- /dev/null
+++ b/filters/plaintext
@@ -0,0 +1,16 @@
+# 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
+ }
+}