Add Taskwarrior functions to display day, week,…

This commit is contained in:
Jeremy Gardais 2019-10-14 13:20:30 +02:00
parent 84e8010f69
commit d9f761340f
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 29 additions and 4 deletions

33
zshrc
View File

@ -322,23 +322,48 @@ alias jctl="journalctl"
# Taskwarrior {{{ # Taskwarrior {{{
## Aliases ## Aliases
alias wtask="task +work | head"
alias t="task" alias t="task"
alias tawa="task waiting" alias tawa="task waiting"
## search a task by it's name (case INsensitive) ## By tag
alias tawork="task +work | head"
alias taperso="task +perso | head"
## search a task by it's name (case INsensitive) {{{
function tase() { function tase() {
search=""; search="";
for i; do; search="$search /$i/"; done; for i; do; search="$search /$i/"; done;
task rc.search.case.sensitive:no $search all; task rc.search.case.sensitive:no $search all;
} }
## }}}
## search a task by it's name (case SENSITIVE) ## search a task by it's name (case SENSITIVE) {{{
function tasec() { function tasec() {
search=""; search="";
for i; do; search="$search /$i/"; done; for i; do; search="$search /$i/"; done;
task $search all; task $search all;
} }
## }}}
## Display tasks of today {{{
function taday() {
timew summary :day :ids "${*}"
}
## }}}
## Display tasks of this week {{{
function taweek() {
timew summary :week :ids "${*}"
}
## }}}
## Display tasks of this month {{{
function tamonth() {
timew summary :month :ids "${*}"
}
## }}}
## Display tasks of this year {{{
function tayear() {
timew summary :year :ids "${*}"
}
## }}}
## Completion ## Completion
zstyle ':completion:*:*:task:*' verbose yes zstyle ':completion:*:*:task:*' verbose yes