aboutsummaryrefslogtreecommitdiff
path: root/lib/grep.ml
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-05-15 14:18:05 -0500
committerMarc Coquand <marc@mccd.space>2024-05-15 14:18:05 -0500
commit613b17e9f30b4def18e014993576a4324d9b11a4 (patch)
treeeada6c85627f617dc226137d0f1a024360ca2baa /lib/grep.ml
parente1bdc8f64a16b233a2633b05c2b073169a4c42c4 (diff)
downloadstitch-613b17e9f30b4def18e014993576a4324d9b11a4.tar.gz
stitch-613b17e9f30b4def18e014993576a4324d9b11a4.tar.bz2
stitch-613b17e9f30b4def18e014993576a4324d9b11a4.zip
Add regexp search for done and todo
Diffstat (limited to 'lib/grep.ml')
-rw-r--r--lib/grep.ml24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/grep.ml b/lib/grep.ml
index 0e8294a..f672d01 100644
--- a/lib/grep.ml
+++ b/lib/grep.ml
@@ -99,6 +99,30 @@ let pretty_format_todo parsed_headlines =
parsed_headlines
+let get_tagged_done tag () =
+ let open Shexp_process in
+ let open Shexp_process.Infix in
+ eval
+ (chdir
+ execution_directory
+ (call done_get_args
+ |- call [ grep_cmd; "--no-messages"; "-E"; tag ]
+ |- call [ "sort"; "-n"; "-r" ]
+ |- read_all))
+
+
+let get_tagged_todo tag () =
+ let open Shexp_process in
+ let open Shexp_process.Infix in
+ eval
+ (chdir
+ execution_directory
+ (call todo_get_args
+ |- call [ grep_cmd; "--no-messages"; "-E"; tag ]
+ |- call [ "sort"; "-n"; "-r" ]
+ |- read_all))
+
+
let toggle_done file_name =
let open Shexp_process in
run_calls