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/command_write.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/askcli/command_write.go') diff --git a/internal/askcli/command_write.go b/internal/askcli/command_write.go index b39b64a..c55bd95 100644 --- a/internal/askcli/command_write.go +++ b/internal/askcli/command_write.go @@ -19,7 +19,7 @@ func (d Dispatcher) handleDenotate(ctx context.Context, args []string, stdout, s } text := args[2] var outBuf bytes.Buffer - code, err := d.runner.Run(ctx, []string{"denotate", uuid, text}, nil, &outBuf, io.Discard) + code, err := d.runner.Run(ctx, []string{"uuid:" + uuid, "denotate", text}, nil, &outBuf, io.Discard) if code != 0 { return code, err } @@ -136,7 +136,7 @@ func (d Dispatcher) handlePriority(ctx context.Context, args []string, stdout, s } priority := args[2] var outBuf bytes.Buffer - code, err := d.runner.Run(ctx, []string{"priority", uuid, priority}, nil, &outBuf, io.Discard) + code, err := d.runner.Run(ctx, []string{"uuid:" + uuid, "modify", "priority:" + priority}, nil, &outBuf, io.Discard) if code != 0 { return code, err } @@ -156,7 +156,7 @@ func (d Dispatcher) handleTag(ctx context.Context, args []string, stdout, stderr } tag := args[2] var outBuf bytes.Buffer - code, err := d.runner.Run(ctx, []string{"tag", uuid, tag}, nil, &outBuf, io.Discard) + code, err := d.runner.Run(ctx, []string{"uuid:" + uuid, "modify", tag}, nil, &outBuf, io.Discard) if code != 0 { return code, err } -- cgit v1.2.3