dominikbraun / timetrace

A simple CLI for tracking your working time.
Apache License 2.0
679 stars 75 forks source link

Idea: Default edit command should edit last entry #120

Open sfrique opened 3 years ago

sfrique commented 3 years ago

Hello,

I think a good behavior for the user would be when running timetrace edit without any arguments, it would open the current or the last (if no current) record, that way we can easily update the start or the end time for a record.

This helps a lot when you forget to start a record, and want to edit so the start time is lets say 5m before and also if you forgot to stop a task you can make that change as well.

Another improvement would be to have an option for the start flag and say, timetrace start project one 5min ago but I guess this needs a bit more thinking and another issue for it!

dominikbraun commented 3 years ago

I've been in this situation as well. At the moment, edit record always edits the end time with the --minus or --plus flags. It is possible to edit the start time manually, but this currently doesn't rename the record file (see #89), which I'd recommend to do manually if you edit the start time.

However, there's #97 (which is addressed by #118). This would replace your timetrace start project one 5min ago suggestion. Would this maybe be a solution for this issue as well?

dominikbraun commented 3 years ago

Regardless of the create record command which will be released with timetrace v0.11.0 within the next days, editing the last record if no record key is given would be a good match for the change introduced by #125, which will list records of the current day if no date is given. So I'd be open to this change 👍