feat: add hard delete flag and opal clean command

Add --hard flag to `opal delete` for permanent removal and a new
`opal clean` command to bulk-purge soft-deleted tasks with optional
--older duration filter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 22:30:50 +01:00
parent 08123aa3c5
commit 10421b0ec6
4 changed files with 153 additions and 11 deletions
+3 -1
View File
@@ -32,7 +32,7 @@ var (
// Command classification
var commandNames = []string{
"add", "done", "modify", "delete",
"add", "done", "modify", "delete", "clean",
"start", "stop", "count", "projects", "tags",
"info", "edit", "server", "sync", "reports", "setup",
"version", "annotate", "denotate", "undo", "uncomplete", "log", "completion",
@@ -284,6 +284,7 @@ func init() {
undoCmd.GroupID = "task"
uncompleteCmd.GroupID = "task"
logCmd.GroupID = "task"
cleanCmd.GroupID = "task"
rootCmd.AddCommand(addCmd)
rootCmd.AddCommand(doneCmd)
@@ -298,6 +299,7 @@ func init() {
rootCmd.AddCommand(undoCmd)
rootCmd.AddCommand(uncompleteCmd)
rootCmd.AddCommand(logCmd)
rootCmd.AddCommand(cleanCmd)
// Other commands
countCmd.GroupID = "other"