This is a Todo tool implemented in Shell, and below is its usage instructions:
todo [options] [arguments]
-aor--add: Add a task to the todo list.-dor--done: Mark a task as completed.-uor--undo: Undo a completed task.-Dor--delor--delete: Delete a task.-ror--recycle: Clear completed tasks.-sor--sort: Sort tasks by task number.-lor--listor empty option: Display the task list.-hor--help: Display help information.
add: The content of the task to be added.done: The task number to mark as completed.undo: The task number to undo completion.delete: The task number to delete.lineNum: Starting line number for operations.toLineNum: Ending line number for operations.
- Add a task:
todo -a "Buy groceries"
- Mark a task as completed:
todo -d 1
- Undo a completed task:
todo -u 1
- Delete a task:
todo -D 1
- Clear completed tasks:
todo -r
- Sort the task list:
todo -s
- Display the task list:
todo -l
- Display help information:
todo -h
Note: If no option is provided, the arguments will be treated as the content of a task to be added to the list.
# The following two commands have the same effect
todo Buy groceries
todo -a Buy groceries
You can choose appropriate options and arguments to manage your task list according to your needs.