feat: add --dry-run flag to action commands
Adds a persistent --dry-run flag that shows matched tasks without performing mutations. Supported on done, delete, modify, start, and stop commands. Also fixes preprocessArgs to skip flag-like args when identifying commands, preventing flags from being treated as filters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,12 @@ func completeTasks(args []string) error {
|
||||
return fmt.Errorf("no tasks matched filter")
|
||||
}
|
||||
|
||||
if dryRunFlag {
|
||||
fmt.Print(engine.FormatTaskConfirmList("complete", tasks, ws))
|
||||
fmt.Println("Dry run — no changes made.")
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(tasks) > 1 {
|
||||
fmt.Print(engine.FormatTaskConfirmList("complete", tasks, ws))
|
||||
fmt.Printf("Proceed? (y/N): ")
|
||||
|
||||
Reference in New Issue
Block a user