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

Allow resuming nth-to-last activity (klog start) #282

Closed
jotaen opened this issue Feb 1, 2024 · 0 comments · Fixed by #301
Closed

Allow resuming nth-to-last activity (klog start) #282

jotaen opened this issue Feb 1, 2024 · 0 comments · Fixed by #301
Labels
ENHANCEMENT Ideas and feature requests

Comments

@jotaen
Copy link
Owner

jotaen commented Feb 1, 2024

klog start --resume currently resumes the latest activity (i.e., takes over the latest entry summary). It would be helpful if there was a way to also resume the nth-to-last activity, like klog start --resume 2 for the second-to-latest one.

This probably requires introducing a new flag along the lines of --resume-nth (naming tbd), because flag values cannot be optional, and the --resume base case shouldn’t require a mandatory value of 1.

While on it, klog switch should also have that new flag / behaviour.

Originated in #281.

@jotaen jotaen added the ENHANCEMENT Ideas and feature requests label Feb 1, 2024
jotaen added a commit that referenced this issue Mar 6, 2024
Resolves #282.

You can now specify which entry to resume – e.g.:

- `--resume-nth=1` takes over the summary of the first entry
- `--resume-nth=2` takes over the summary of the second entry
- `--resume-nth=-1` takes over the summary of the last entry
- `--resume-nth=-2` takes over the summary of the second-to-last entry

You can also use the shorthand `-N`. Remember to omit the delimiter
after the flag name then, so it would be `-N1`, `-N2`, `-N-1`, `-N-2`,
etc.
jotaen added a commit that referenced this issue Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENHANCEMENT Ideas and feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant