jazzband / Watson

:watch: A wonderful CLI to track your time!
http://tailordev.github.io/Watson/
MIT License
2.46k stars 240 forks source link

Add gap/no-gap options to restart command #437

Closed joelostblom closed 3 years ago

joelostblom commented 3 years ago

I often find myself typing in watson restart -2 -G or similar and being surprised when it doesn't work. Overall, I think restart should work as similarly as possible to start, so I suggest adding the gap options in this PR.

I also added a generic test for restart that can keep track of whether its basic functionality break in future PRs, although it doesn't test the gap options per se (same as for the start test).

I also changed the parameter name from frame to id to make restart consistent with remove and edit. Since you can pass a frame either by position or id, this param name is not ideal, but neither is frame since that is used as a variable name for an actual frame object. This is the smallest change that brings consistency across commands.