From 1433f7a13ede0c819ec4f8fd4027ad3df8daa94f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 5 Jun 2026 10:26:16 +0300 Subject: Add 'ask edit' subcommand and collapse multi-line task descriptions - ask edit opens $EDITOR and creates a task from the (multi-line) content, reusing the shared internal/editor package - collapse newlines in list output and fish completion so multi-line descriptions render on one line and don't break completion Bump version to 0.40.0 Amp-Thread-ID: https://ampcode.com/threads/T-019e96a1-9c8e-73d6-95b4-b55cb12cc762 Co-authored-by: Amp --- internal/askcli/command_complete_uuids.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/askcli/command_complete_uuids.go') diff --git a/internal/askcli/command_complete_uuids.go b/internal/askcli/command_complete_uuids.go index bc160b6..5c26649 100644 --- a/internal/askcli/command_complete_uuids.go +++ b/internal/askcli/command_complete_uuids.go @@ -85,9 +85,11 @@ func taskCompletionAliasItems(tasks []TaskExport, aliases map[string]string) []s return items } -// truncateDescription shortens s to at most maxLen characters, appending "…" -// when the string is cut, so the completion hint fits on one line. +// truncateDescription collapses any embedded newlines to keep the completion +// item on a single line, then shortens s to at most maxLen characters, +// appending "…" when the string is cut, so the completion hint fits on one line. func truncateDescription(s string, maxLen int) string { + s = oneLineDescription(s) runes := []rune(s) if len(runes) <= maxLen { return s -- cgit v1.2.3