samg / timetrap

Simple command line timetracker
http://rubygems.org/gems/timetrap
Other
1.48k stars 116 forks source link

feature request: undo the most recent out command. #184

Open ian-kelling opened 4 years ago

ian-kelling commented 4 years ago

I sometimes clock out, then very quickly realize I need to finish one last thing, and I don't bother to clock back in because it will only take a minute, but then of course it takes a lot longer. I have a bash command that runs this:

sqlite3 ~/.timetrap.db "update entries set end = NULL where id = (select max(id) from entries);

but it seems it would be better if there was an equivalent within timetrap.

namdnguyen commented 4 years ago

I run into this need occasionally, too. The workaround I use is to finish my task, then do t e -e 'now' when I'm done to bump up the end time. Then you can clock into the next task. To minimize the gap between the previous task and the next task that comes from typing in the next task, you can make it a one line command like t e -e 'now'; t i 'Next task'.

dechimp commented 4 years ago

Just wondering if implemented what the argument to -e would look like. -e "none"? or a blank value -e ""?