From 1ab28d35a82ceb89ad4fe71582659bd717757ab6 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 26 Nov 2025 10:09:40 -0500 Subject: Add task delete command --- Omni/Task.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Omni/Task.hs') diff --git a/Omni/Task.hs b/Omni/Task.hs index da3b23a..9cb061c 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -45,6 +45,7 @@ Usage: task init [--quiet] task create [options] task edit <id> [options] + task delete <id> [--json] task list [options] task ready [--json] task show <id> [--json] @@ -62,6 +63,7 @@ Commands: init Initialize task database create Create a new task or epic edit Edit an existing task + delete Delete a task list List all tasks ready Show ready tasks (not blocked) show Show detailed task information @@ -250,6 +252,12 @@ move' args if isJsonMode args then outputJson updatedTask else putStrLn <| "Updated task: " <> T.unpack (taskId updatedTask) + | args `Cli.has` Cli.command "delete" = do + tid <- getArgText args "id" + deleteTask tid + if isJsonMode args + then outputSuccess ("Deleted task " <> tid) + else putStrLn <| "Deleted task: " <> T.unpack tid | args `Cli.has` Cli.command "list" = do maybeType <- case Cli.getArg args (Cli.longOption "type") of Nothing -> pure Nothing -- cgit v1.2.3