Skip to content
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

Referencing time entries based on their order #96

Open
AuHau opened this issue Jan 21, 2019 · 0 comments
Open

Referencing time entries based on their order #96

AuHau opened this issue Jan 21, 2019 · 0 comments

Comments

@AuHau
Copy link
Owner

AuHau commented Jan 21, 2019

For easier management of time entries, it would be better to employ special syntax, that would refer to time entry not with ID or its description, but by the order they are presented in the listing.

The listing would have numbered lines:

    Description  Duration                  Start                   Stop
 1. Some entry    0:04:09  9:07:32 AM 01/21/2019                running
 2. Some entry    0:00:11             8:54:57 AM  8:55:08 AM 01/21/2019
 3. Some entry    0:02:00             8:54:08 AM  8:56:08 AM 01/21/2019

Then it would be possible to reference the issues like: toggl continue $2, toggl rm $3.

Potential problems:

If there is a change in the state from another source (Toggl's web client, other tool using it API calls) the referenced lines may differ and hence you can modify (or worse - delete) lines that you have not intended.

One solution to this problem, could be to store the state of the last command locally and when a call with this syntax, the ID of the referenced line would have to be retrieved from the previously stored state. This could go hand in hand with #86. But even then it could resolve in problems.

Let me know what you think and if you would be interested in such a feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant