Conversation
|
I haven't done any programming in rust (yet) but I am building from source and will give it a try! |
|
That's great! If you run into any issues feel to reach out. |
|
Would it make sense to also support flags here for non-interactive mode. For instance, Only |
|
That makes sense, it is quite similar to The only limitation it's not trivial to choose which time-entry to edit. But yeah for this reason I was hoping to use the Another option could be add |
- Reusing the same handle wasn't helping
- Also deserialize from bytes, makes both marshal and unmarshal process a bit more open to different use-cases
adb1378 to
8b7e602
Compare
8b7e602 to
d48fcf9
Compare
|
Ah, I see. I had the impression that it was for the current running entry only |
|
Yeah at the moment that's the case, and I feel 90% of the time that is how it will end I feel it'd be nice if Though if you feel strongly in either direction let us know! |
92b8a40 to
48f2c5c
Compare
48f2c5c to
a41bbb1
Compare
|
@wd60622 I've added a Todos list to the PR description, and pushed some changes so editing the running entry now works with the editor of your choice and |
|
Hi @shantanuraj , back looking at this again 👋 Definitely think approaching 1. current time entry and 2. all past time entries separately is good idea. If current time entry is easiest, then that should be first. Thoughts on the difficulty to make it non-interactive. For instance, |
What does this PR do?
This adds support for editing time-entries.
This opens the time-entry as a text file in the default editor.1
The user can then edit the time-entry and save the file.
The time-entry is then updated with the new values.
The core of this lies in the
Parceltrait, which allows us to serialize anddeserialize the time-entry into a sequence of bytes.
I'm still ironing out the details of this, but it seems to be working well so
far. And the
launch_in_editormethod should probably be moved to a separatetrait, as it's not really related to serialization/deserialization.
Changes
Todos
editorconfiguration totoggl configGif
Context
TODO
Footnotes
The default editor is determined by the
EDITORenvironment variable.If this is not set, we default to
vim. It might be worth to add smarterfallbacks, like checking for
VISUALorgit config core.editor.In addition to adding our own variable
TOGGL_EDITORin case the userwants to use their editor with different configuration for
toggl. ↩