From e8084679cbbca13a3427898d289a69b1f0a59a8b Mon Sep 17 00:00:00 2001
From: Joe <rrbo@proton.me>
Date: Thu, 2 Mar 2023 14:19:56 +0100
Subject: idea up

---
 .local/bin/idea | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to '.local/bin/idea')

diff --git a/.local/bin/idea b/.local/bin/idea
index b5fc477..fc0f244 100755
--- a/.local/bin/idea
+++ b/.local/bin/idea
@@ -8,16 +8,13 @@ else
 	thought="$*"
 fi
 
-thought_a="$(printf "%s" "${thought}" | sed "s/\n/<br>/")"
-exit
+thought="$(echo -n "${thought}" | sed '{s/$/<br>\\/;s/^/\\t\\t\\t\\t\\t/;};${s/<br>\\$/\\/;p;x;};1d')"
 date=$(date '+%a, %d %b %Y %T')
 html_fmt='\t\t\t\t<h3>'"${date}"'<\/h3>\
 \t\t\t\t<p>\
-\t\t\t\t\t'"${thought_a}"'\
+'"${thought}"'
 \t\t\t\t<\/p>\
 '
-echo "%s" "${html_fmt}"
-exit
 case $(hostname -s) in
 	mother|po-rbo) sed="sed -i" ;;
 	fbsd-tp) sed="sed -i ''" ;;
-- 
cgit v1.2.3