diff options
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 |
