-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow editing time entries #86
base: main
Are you sure you want to change the base?
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 |
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
Parcel
trait, 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_editor
method should probably be moved to a separatetrait, as it's not really related to serialization/deserialization.
Changes
Todos
editor
configuration totoggl config
Gif
Context
TODO
Footnotes
The default editor is determined by the
EDITOR
environment variable.If this is not set, we default to
vim
. It might be worth to add smarterfallbacks, like checking for
VISUAL
orgit config core.editor
.In addition to adding our own variable
TOGGL_EDITOR
in case the userwants to use their editor with different configuration for
toggl
. ↩