samg / timetrap

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

Cannot remove note #164

Closed Huluk closed 2 years ago

Huluk commented 6 years ago

It does not seem possible to remove a note once it is added. I tried to use t edit '' and variations of it, but the note remains.

Current workaround: t edit with a zero-width space as argument at least removes any visible notes.

jostber commented 6 years ago

Is it the same if you edit the note with the editor option?

samg commented 6 years ago

You can use the t kill --id command to delete entries. There's more detailed usage info in the Readme.

Huluk commented 6 years ago

@jostber Thank you for drawing my attention to the editor, it is indeed possible to remove a note with it.

@samg the kill command does only solve the problem in a very complicated manner – if I want to remove the note from an older entry, I have to write down its start and end time, kill the entry, then recreate it using t in --at $OLD_START_TIME and t out --at $OLD_END_TIME. Possible, but complicated. Both changing config and the workaround with kill are quite complicated, so I'd prefer to re-open this issue. I am not at all opposed to fixing the problem myself, I just have not found the time yet to figure out how the edit code works.

samg commented 6 years ago

Sorry misunderstood your issue. I see the current semantics of the CLI make it impossible to blank out a note, though the editor option provides a nice workaround.

I'm happy to reopen the issue and review any PRs that would address this.

Thanks!