diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-23 13:35:07 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-23 13:35:07 +0200 |
| commit | bc0849e96fe41e509af4306c0953f463a7fad155 (patch) | |
| tree | ca80dd932d177bdbe9eb80cb8bffe4197d50e625 /internal/askcli/command_write.go | |
| parent | 462184dff3eef32f01f06634305da1355ac1bec2 (diff) | |
fix: accept uuid: prefix on all ask subcommands via NormalizeUUID
All ask commands now strip a leading "uuid:" prefix from user-supplied
UUID arguments before building the taskwarrior filter, so both bare UUIDs
and the "uuid:<value>" format work uniformly across annotate, start, stop,
done, modify, denotate, priority, tag, info, delete, and dep.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/askcli/command_write.go')
| -rw-r--r-- | internal/askcli/command_write.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/askcli/command_write.go b/internal/askcli/command_write.go index b07ce3e..64000d7 100644 --- a/internal/askcli/command_write.go +++ b/internal/askcli/command_write.go @@ -12,7 +12,7 @@ func (d Dispatcher) handleDenotate(ctx context.Context, args []string, stdout, s io.WriteString(stderr, "error: ask denotate requires a UUID and text argument\n") return 1, nil } - uuid := args[1] + uuid := NormalizeUUID(args[1]) if IsNumericID(uuid) { io.WriteString(stderr, RejectNumericID()) return 1, nil @@ -32,7 +32,7 @@ func (d Dispatcher) handleModify(ctx context.Context, args []string, stdout, std io.WriteString(stderr, "error: ask modify requires a UUID and modification args\n") return 1, nil } - uuid := args[1] + uuid := NormalizeUUID(args[1]) if IsNumericID(uuid) { io.WriteString(stderr, RejectNumericID()) return 1, nil @@ -52,7 +52,7 @@ func (d Dispatcher) handleAnnotate(ctx context.Context, args []string, stdout, s io.WriteString(stderr, "error: ask annotate requires a UUID and note argument\n") return 1, nil } - uuid := args[1] + uuid := NormalizeUUID(args[1]) if IsNumericID(uuid) { io.WriteString(stderr, RejectNumericID()) return 1, nil @@ -72,7 +72,7 @@ func (d Dispatcher) handleStart(ctx context.Context, args []string, stdout, stde io.WriteString(stderr, "error: ask start requires a UUID argument\n") return 1, nil } - uuid := args[1] + uuid := NormalizeUUID(args[1]) if IsNumericID(uuid) { io.WriteString(stderr, RejectNumericID()) return 1, nil @@ -93,7 +93,7 @@ func (d Dispatcher) handleStop(ctx context.Context, args []string, stdout, stder io.WriteString(stderr, "error: ask stop requires a UUID argument\n") return 1, nil } - uuid := args[1] + uuid := NormalizeUUID(args[1]) if IsNumericID(uuid) { io.WriteString(stderr, RejectNumericID()) return 1, nil @@ -112,7 +112,7 @@ func (d Dispatcher) handleDone(ctx context.Context, args []string, stdout, stder io.WriteString(stderr, "error: ask done requires a UUID argument\n") return 1, nil } - uuid := args[1] + uuid := NormalizeUUID(args[1]) if IsNumericID(uuid) { io.WriteString(stderr, RejectNumericID()) return 1, nil @@ -131,7 +131,7 @@ func (d Dispatcher) handlePriority(ctx context.Context, args []string, stdout, s io.WriteString(stderr, "error: ask priority requires a UUID and priority (H/M/L)\n") return 1, nil } - uuid := args[1] + uuid := NormalizeUUID(args[1]) if IsNumericID(uuid) { io.WriteString(stderr, RejectNumericID()) return 1, nil @@ -151,7 +151,7 @@ func (d Dispatcher) handleTag(ctx context.Context, args []string, stdout, stderr io.WriteString(stderr, "error: ask tag requires a UUID and +/-tag\n") return 1, nil } - uuid := args[1] + uuid := NormalizeUUID(args[1]) if IsNumericID(uuid) { io.WriteString(stderr, RejectNumericID()) return 1, nil |
