From bc0849e96fe41e509af4306c0953f463a7fad155 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 23 Mar 2026 13:35:07 +0200 Subject: 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:" format work uniformly across annotate, start, stop, done, modify, denotate, priority, tag, info, delete, and dep. Co-Authored-By: Claude Sonnet 4.6 --- internal/askcli/formatter.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/askcli/formatter.go') diff --git a/internal/askcli/formatter.go b/internal/askcli/formatter.go index 41e3b3b..886e819 100644 --- a/internal/askcli/formatter.go +++ b/internal/askcli/formatter.go @@ -60,6 +60,14 @@ func FormatError(err error, uuid string) string { return fmt.Sprintf("error: %v\n", err) } +// NormalizeUUID strips any leading "uuid:" prefix so callers can accept +// both "uuid:" and bare UUID strings interchangeably. The returned +// value is always a plain UUID ready to be prefixed again when building +// taskwarrior filter arguments. +func NormalizeUUID(s string) string { + return strings.TrimPrefix(s, "uuid:") +} + func IsNumericID(s string) bool { if s == "" { return false -- cgit v1.2.3