You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like the ability to have hooks that are triggered immediately before and after saving a new task (or updating an existing one, and possibly archiving one as well?). My use case for before saving a task is simple:
I want to be able to say t add This is a test task due:tomorrow, and have my pre-save hook look for due:tomorrow (or any other string I determine), and modify the task text before it gets written to todo.txt. Obviously, this only works for tasks added via todo.sh.
I'm willing to figure out how to do this myself, but if it's something the community doesn't want, I won't expend the energy :)
The text was updated successfully, but these errors were encountered:
I think this can pretty easily be solved with an add-on. Say instead of typing in todo.sh add "NEW TASK", I could make an add-on that is todo.sh addf "NEW TASK due:tomorrow". I'm willing to write this if you'd like! I'll also take name suggestions as addf isn't very pretty looking.
Alternatively this could be made to work outside of todo.sh if you wanted to be creative by setting TOMORROW as a variable, and using that instead, so bash (or whatever shell) expands it before being written. Not sure how you'd keep the variable up to date, but that's just one other option.
@gms8994, I made this add-on, it replaces add. I think this should be done with the script and not an add-on longterm but I don't know the right way to implement (I am working on it).
I'd like the ability to have hooks that are triggered immediately before and after saving a new task (or updating an existing one, and possibly archiving one as well?). My use case for before saving a task is simple:
I want to be able to say
t add This is a test task due:tomorrow
, and have my pre-save hook look fordue:tomorrow
(or any other string I determine), and modify the task text before it gets written to todo.txt. Obviously, this only works for tasks added via todo.sh.I'm willing to figure out how to do this myself, but if it's something the community doesn't want, I won't expend the energy :)
The text was updated successfully, but these errors were encountered: