enh: add an 'add' command to the CLI
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TKDO |
Confirmed
|
Low
|
Unassigned |
Bug Description
A command line function to add new tasks would be useful. Bill Powell has already done most of the UI design in contrib/tkdocli, but there are some tweaks to be made for an integrated version.
The basic usage would be something like one of these:
t add car Change the oil -d 6m
t add -f car Change the oil -d 6m
t add -f ~/text/
I'm not yet sure whether the file should be specified by title or path. And, if it's by path, whether the directory should have a default (~/tasks/ or similar).
Also, I'm not sure whether the file needs a '-f' or if the first word should be used for it automatically.
An option is probably needed to specify whether to add new tasks to the top or bottom of the file. Some users may have the bottom reserved for a "Done:" branch with completed tasks. However, adding them at the top tends to put them in reverse order.
Changed in tkdo: | |
status: | New → Confirmed |
Changed in tkdo: | |
milestone: | none → 0.7 |
It would also be nice to have an option to specify a parent task, for things such as:
t add wri -p "novel" -t "reread chapter 2"
The '-p' or '--parent' option would probably just pick the first task which contained the query string, and add the new task as a child.
It might also be useful to have an option to specify an immediate sibling instead of a parent, but maybe not. It would probably be easier most of the time to just edit the file or use the GUI.
A '--diff' option could help the user verify that the requested change was made correctly.