From e8910ecd98488bc2dcc82389a82b14ca2361617a Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Sun, 21 Aug 2022 09:34:37 -0400 Subject: colored output --- DEVELOPING.md | 2 ++ libexec/recit-entries | 3 ++- share/recit/templates/entries.templ | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 DEVELOPING.md 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}} -- cgit v1.2.3