diff options
author | Julio Capote <jcapote@gmail.com> | 2022-09-09 02:05:55 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2022-09-09 02:05:55 +0000 |
commit | d79f13cbcc3fd07b483a9744e87f3e5f3e5860cc (patch) | |
tree | ec5e691976f2610ede9fe9619d83a9c46bb1f800 | |
parent | e5eba08f3d2ad61e2452a02eb4f80f94297e3f68 (diff) | |
download | recit-d79f13cbcc3fd07b483a9744e87f3e5f3e5860cc.tar.gz |
working todos
-rwxr-xr-x | libexec/recit-todo | 17 | ||||
-rw-r--r-- | share/recit/templates/custom_delim.templ | 3 |
2 files changed, 9 insertions, 11 deletions
diff --git a/libexec/recit-todo b/libexec/recit-todo index 35f3005..cdbb638 100755 --- a/libexec/recit-todo +++ b/libexec/recit-todo @@ -36,13 +36,10 @@ if ! [[ "$project" = "" ]]; then fi fi - -recit-recsel-entries "$expression" | grep '[0-9][0-9][0-9][0-9]-[0-9][0-9]\|TODO' - -# recfile=$(recit-file) -# if [[ "$expression" = "" ]]; then -# out=$(recsel -t Entry "$recfile" | recfmt -f "$_RECIT_ROOT/share/recit/templates/custom_delim.templ") -# else -# out=$(recsel -t Entry "$recfile" -e "$expression" | recfmt -f "$_RECIT_ROOT/share/recit/templates/custom_delim.templ") -# fi -# echo -e "$out" +recfile=$(recit-file) +if [[ "$expression" = "" ]]; then + out=$(recsel -t Entry "$recfile" | recfmt -f "$_RECIT_ROOT/share/recit/templates/custom_delim.templ") +else + out=$(recsel -t Entry "$recfile" -e "$expression" | recfmt -f "$_RECIT_ROOT/share/recit/templates/custom_delim.templ") +fi +echo -e "$out" | grep TODO | awk '{ split($0,a,"@@@"); printf "%s (%s)\n%s\n\n", a[1],a[2],a[3]; }' diff --git a/share/recit/templates/custom_delim.templ b/share/recit/templates/custom_delim.templ index 876bd0c..f0cbe2f 100644 --- a/share/recit/templates/custom_delim.templ +++ b/share/recit/templates/custom_delim.templ @@ -1 +1,2 @@ -:@/{{Id}}:@/{{Time}}:@/{{Notes}} +\033[1;36m{{Time}}\033[0m@@@{{Id}}@@@{{Notes}} + |