diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-26 10:09:40 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-26 10:09:40 -0500 |
| commit | 1ab28d35a82ceb89ad4fe71582659bd717757ab6 (patch) | |
| tree | cdd4edba3ded815fe5a5e1a6aced52a0bb77c7c7 /Omni/Task.hs | |
| parent | 32e5b5b097c50d0b1d8a3dbcf93163aabf1ee8fb (diff) | |
Add task delete command
Diffstat (limited to 'Omni/Task.hs')
| -rw-r--r-- | Omni/Task.hs | 8 |
1 files changed, 8 insertions, 0 deletions
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 <title> [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 |
