diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -82,6 +82,25 @@ func main() { }, }, { + Name: "undo", + Aliases: []string{"u"}, + Usage: "reset a task on the list", + Arguments: []cli.Argument{ + &cli.IntArg{ + Name: "taskIndex", + }, + }, + Action: func(ctx context.Context, cmd *cli.Command) error { + taskIndex := cmd.IntArg("taskIndex") + + if taskIndex <= 0 { + return fmt.Errorf("invalid 'undo' argument: %d", taskIndex) + } + + return ctrl.cmdUndo(taskIndex) + }, + }, + { Name: "list", Aliases: []string{"l"}, Usage: "list pending tasks", |
