Add timew function for last month and week

This commit is contained in:
Jeremy Gardais 2020-03-23 08:16:19 +01:00
parent 3d823c57e0
commit 51c95762d4
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 27 additions and 0 deletions

27
zshrc
View File

@ -365,6 +365,15 @@ function taweek() {
fi fi
} }
## }}} ## }}}
## Display tasks of last week {{{
function talastweek() {
if [ "${#}" -eq 0 ]; then
timew summary :lastweek :ids
else
timew summary :lastweek :ids "${*}"
fi
}
## }}}
## Display tasks of this month {{{ ## Display tasks of this month {{{
function tamonth() { function tamonth() {
if [ "${#}" -eq 0 ]; then if [ "${#}" -eq 0 ]; then
@ -374,6 +383,15 @@ function tamonth() {
fi fi
} }
## }}} ## }}}
## Display tasks of last month {{{
function talastmonth() {
if [ "${#}" -eq 0 ]; then
timew summary :lastmonth :ids
else
timew summary :lastmonth :ids "${*}"
fi
}
## }}}
## Display tasks of this year {{{ ## Display tasks of this year {{{
function tayear() { function tayear() {
if [ "${#}" -eq 0 ]; then if [ "${#}" -eq 0 ]; then
@ -383,6 +401,15 @@ function tayear() {
fi fi
} }
## }}} ## }}}
## Display tasks of last year {{{
function talastyear() {
if [ "${#}" -eq 0 ]; then
timew summary :lastyear :ids
else
timew summary :lastyear :ids "${*}"
fi
}
## }}}
## Completion ## Completion
zstyle ':completion:*:*:task:*' verbose yes zstyle ':completion:*:*:task:*' verbose yes