From f6ce62d4e5cefc4a7761bbb86f329ad08ba57570 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 22 Mar 2026 22:21:44 +0200 Subject: ask: fix CLI commands to use correct Taskwarrior argument formats - handlePriority: use 'uuid: modify priority:' instead of 'priority ' - handleTag: use 'uuid: modify +/-tag' instead of 'tag +/-tag' - handleDelete: use 'uuid: delete' and pass stdin for confirmation - handleDenotate: use 'uuid: denotate ' instead of 'denotate ' - Add integration tests for all ask CLI subcommands - Update unit tests to match new command argument formats - createTask now uses task info to get UUID instead of export parsing - parseTaskInfoText fixed to split tags by ', ' instead of whitespace --- internal/askcli/dispatch.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'internal/askcli/dispatch.go') diff --git a/internal/askcli/dispatch.go b/internal/askcli/dispatch.go index 42097c5..312a6cf 100644 --- a/internal/askcli/dispatch.go +++ b/internal/askcli/dispatch.go @@ -28,8 +28,6 @@ func (d Dispatcher) Dispatch(ctx context.Context, args []string, stdin io.Reader } subcommand := args[0] switch subcommand { - case "export": - return d.runner.Run(ctx, args, stdin, stdout, stderr) case "info": return d.handleInfo(ctx, args, stdout, stderr) case "add": @@ -61,7 +59,7 @@ func (d Dispatcher) Dispatch(ctx context.Context, args []string, stdin io.Reader case "denotate": return d.handleDenotate(ctx, args, stdout, stderr) case "delete": - return d.handleDelete(ctx, args, stdout, stderr) + return d.handleDelete(ctx, args, stdin, stdout, stderr) case "help": return d.help(stdout) default: @@ -90,9 +88,6 @@ func (d Dispatcher) help(w io.Writer) (int, error) { io.WriteString(w, " ask modify Modify task fields\n") io.WriteString(w, " ask denotate \"text\" Remove annotation\n") io.WriteString(w, " ask delete Delete task\n") - io.WriteString(w, " ask export Raw JSON export\n") - io.WriteString(w, "\nFilters:\n") - io.WriteString(w, " +READY +BLOCKED + started limit:N sort:priority-,urgency-\n") return 0, nil } -- cgit v1.2.3