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

Add flag for filtering by entry types/kinds #286

Closed
jotaen opened this issue Feb 11, 2024 · 0 comments · Fixed by #296
Closed

Add flag for filtering by entry types/kinds #286

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

Comments

@jotaen
Copy link
Owner

jotaen commented Feb 11, 2024

When filtering records, it would be useful if you could filter by entry type as well, e.g. “only duration entries”, or “only open time ranges”.

The corresponding flag could be called --type (or --kind), and take a mandatory value such as:

  • --type DURATION (would include both positive and negative durations)
    • --type DURATION_POSITIVE (only e.g. -45m)
    • --type DURATION_NEGATIVE (only e.g. 30m or +30m)
  • --type TIME_RANGE (e.g., 8:00-9:00)
  • --type OPEN_RANGE (e.g., 8:00-?)

Originated in #285.

@jotaen jotaen added the ENHANCEMENT Ideas and feature requests label Feb 11, 2024
jotaen added a commit that referenced this issue Mar 2, 2024
Resolves #286.

This let’s you do `klog total --entry-type duration` (for only summing
up duration entries) or `klog print --entry-type open-range` (for only
showing open ranges).
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