diff options
| author | Paul Bütow <1224732+snonux@users.noreply.github.com> | 2025-06-20 09:40:56 +0300 |
|---|---|---|
| committer | Paul Bütow <1224732+snonux@users.noreply.github.com> | 2025-06-20 09:40:56 +0300 |
| commit | 13f7678a9fd092ac20eec10e4d2196f5bd1ae107 (patch) | |
| tree | 512a6b9f8017f8cf0cc24158acc154034c121225 /internal/task/task.go | |
| parent | 13ec0a6ec615b4c7e7ddc461a7a6a623109826f9 (diff) | |
Add cell navigation, editor hotkey, stats and filter
Diffstat (limited to 'internal/task/task.go')
| -rw-r--r-- | internal/task/task.go | 8 |
1 files changed, 6 insertions, 2 deletions
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 <filter> 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 |
