summaryrefslogtreecommitdiff
path: root/filters
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-02-20 23:37:34 +0100
committerRobin Jarry <robin@jarry.cc>2022-02-20 23:46:29 +0100
commit9dc28032201f5dd8bd3e446d9c4230ae5149ab47 (patch)
tree93b118d6aff7e641e91fb87ee919dcd750025135 /filters
parentc63ca9bd9c064781f7aa8b2b96d1d9854e757db2 (diff)
downloadaerc-9dc28032201f5dd8bd3e446d9c4230ae5149ab47.zip
filters: restore plaintext awk script
This script is referenced by some users configuration. Restore it to avoid breaking existing setups. Fixes: bca93cd91536 ("filters: add a more complete plaintext filter") Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'filters')
-rwxr-xr-xfilters/plaintext16
1 files changed, 16 insertions, 0 deletions
diff --git a/filters/plaintext b/filters/plaintext
new file mode 100755
index 0000000..cfaa170
--- /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
+ }
+}