This PR adds the edit sub-command, which can be invoked with the -e or --edit flags. It edits an item in-place. If no task name or expiry are provided, it will prompt for them, similar to the -a flag. If the gathering of input fails, the old item is inserted back into the list, and the list is printed.
Testing
Things to try:
todo -e <index>: edit an item by index
Same command as above, but press ^C when prompted for input
todo -e <index> <title> <date or days>: automatically edit an item from args
Description
This PR adds the edit sub-command, which can be invoked with the
-e
or--edit
flags. It edits an item in-place. If no task name or expiry are provided, it will prompt for them, similar to the-a
flag. If the gathering of input fails, the old item is inserted back into the list, and the list is printed.Testing
Things to try:
todo -e <index>
: edit an item by indextodo -e <index> <title> <date or days>
: automatically edit an item from args