Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Update readme with QoL aliases #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

harnoorsaini
Copy link

No description provided.

Copy link
Owner

@mrusme mrusme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

```
function zbreak {
date -v-$1M +%H:%M | xargs -I{} zeit finish -s {}
zeit track --project YOUR_PROJECT --task YOUR_TASK
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?

function zbreak {
  project=$(zeit tracking --no-colors | sed 's/.* on \(.*\) for .*/\1/gI')
  task=$(zeit tracking --no-colors | sed 's/. tracking \(.*\) on .*/\1/gI')
  date -v-$1M +%H:%M | xargs -I{} zeit finish -s {}
  zeit track --project "$project" --task "$task"
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

BTW, I tried some aliases for "yesterday" and "last week" using --since and --until. The problem is that the currently running task is also summed to the total.

For example, last week total:

zeit list --since "$(date -v-sunday -v-7d +%F)T00:00:00+12:00" --until "$(date -v-sunday +%F)T00:00:00+12:00" --total

I tried using grep/awk/sed but that's beyond my skill/need :)

@mrusme mrusme added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants