aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-08-21 13:34:37 +0000
committerJulio Capote <jcapote@gmail.com>2022-08-21 13:34:37 +0000
commite8910ecd98488bc2dcc82389a82b14ca2361617a (patch)
tree3b31e7f6ae5b0f95c6a5918d96de88c2cb1e7fbf
parent76b279302a6d1f6ecb4b6e1d1fe082aa66451e8f (diff)
downloadrecit-e8910ecd98488bc2dcc82389a82b14ca2361617a.tar.gz
colored output
-rw-r--r--DEVELOPING.md2
-rwxr-xr-xlibexec/recit-entries3
-rw-r--r--share/recit/templates/entries.templ2
3 files changed, 5 insertions, 2 deletions
diff --git a/DEVELOPING.md b/DEVELOPING.md
new file mode 100644
index 0000000..1c3bd20
--- /dev/null
+++ b/DEVELOPING.md
@@ -0,0 +1,2 @@
+# colors in templates
+See https://stackoverflow.com/a/67186462 \ No newline at end of file
diff --git a/libexec/recit-entries b/libexec/recit-entries
index e76f14d..9cb45ca 100755
--- a/libexec/recit-entries
+++ b/libexec/recit-entries
@@ -59,7 +59,8 @@ if ! [[ "$project" = "" ]]; then
fi
if [[ "$expression" = "" ]]; then
- recsel -t Entry "${recfile}" | recfmt -f share/recit/templates/entries.templ
+ out=$(recsel -t Entry "${recfile}" | recfmt -f share/recit/templates/entries.templ)
+ echo -e "$out"
else
recsel -t Entry -e "$expression" "${recfile}"
fi
diff --git a/share/recit/templates/entries.templ b/share/recit/templates/entries.templ
index 1f02a10..9cb37c5 100644
--- a/share/recit/templates/entries.templ
+++ b/share/recit/templates/entries.templ
@@ -1,3 +1,3 @@
-{{Time}} ({{Id}})
+\033[1;36m{{Time}}\033[0m ({{Id}})
{{Notes}}