From 13f7678a9fd092ac20eec10e4d2196f5bd1ae107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= <1224732+snonux@users.noreply.github.com> Date: Fri, 20 Jun 2025 09:40:56 +0300 Subject: Add cell navigation, editor hotkey, stats and filter --- internal/task/task.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'internal/task/task.go') diff --git a/internal/task/task.go b/internal/task/task.go index 4c33fdb..f7a3f73 100644 --- a/internal/task/task.go +++ b/internal/task/task.go @@ -46,8 +46,12 @@ func Add(description string, tags []string) error { // Export retrieves all tasks using `task export rc.json.array=off` and parses // the JSON output into a slice of Task structs. -func Export() ([]Task, error) { - cmd := exec.Command("task", "export", "rc.json.array=off") +// Export retrieves tasks using `task export rc.json.array=off` and parses +// the JSON output into a slice of Task structs. Optional filter arguments are +// passed directly to the `task` command before `export`. +func Export(filters ...string) ([]Task, error) { + args := append(filters, "export", "rc.json.array=off") + cmd := exec.Command("task", args...) out, err := cmd.Output() if err != nil { return nil, err -- cgit v1.2.3