]> git.netwichtig.de Git - user/henk/vcsh/zsh.git/blob - .zsh_functions_taskwarrior
Add 'pass' functions
[user/henk/vcsh/zsh.git] / .zsh_functions_taskwarrior
1 in () {
2     if [ $# -eq 0 ]; then
3         task in
4     else
5         task add +in $@
6     fi
7 }
8
9 tickle () {
10     deadline=$1
11     shift
12     in +tickle wait:$deadline $@
13 }
14
15 think () {
16     tickle +1d $@
17 }
18
19 rnd () {
20     task add +rnd +in $@
21 }
22
23 webpage_title (){
24     wget -qO- "$*" | hxselect -s '\n' -c  'title' 2>/dev/null
25 }
26
27 read_and_review (){
28     local link="$1"
29     local title=$(webpage_title $link)
30     echo $title
31     local descr="\"Read and review: $title\""
32     local id=$(task add +in +read "$descr" | sed -n 's/Created task \(.*\)./\1/p')
33     task "$id" annotate "$link"
34 }
35
36 rnr () {
37     read_and_review $@
38 }
39
40 watch_and_review (){
41     task add +in +watch $@
42 }
43
44 wnr () {
45     watch_and_review $@
46 }