From 40707d12d1a5edc98afd862b68da8fd525257600 Mon Sep 17 00:00:00 2001
From: Colin Okay <colin@cicadas.surf>
Date: Wed, 17 Aug 2022 08:33:41 -0500
Subject: [modify] threadcat-read to include colorized headings

---
 threadcat-read.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/threadcat-read.sh b/threadcat-read.sh
index 424dc55..9d6012b 100755
--- a/threadcat-read.sh
+++ b/threadcat-read.sh
@@ -10,7 +10,14 @@ else
 fi
 
 if [ ! -z "${THREAD_NAME}" ]; then
-    ssh $THREADCAT_USER "cat /opt/threadcat/$THREAD_NAME"
+    readarray -t lines < <(ssh $THREADCAT_USER "cat /opt/threadcat/$THREAD_NAME")
+    for line in "${lines[@]}"; do
+        if [[ $line =~  ^=== ]]; then
+            echo -e "\e[0;36m$line\e[0m"
+        else
+            echo $line;
+        fi
+    done
 else
     echo You did not provide a thread name.
     echo USAGE: "threadcat read [BOARD] THREAD"
-- 
cgit v1.2.3