summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-09-17 20:29:34 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-09-17 20:29:34 +0200
commite7819c83a692c8290cbea43252710cf2d1c39b25 (patch)
tree386ec241a4c0f2d61d202f7044f429d0a0a2a19f /etc
parent61ae6bdef78181c8a243d7974f66481fadc0834a (diff)
devtodo completion: Complete finished entries for --not-done
Diffstat (limited to 'etc')
-rw-r--r--etc/completions/_devtodo18
1 files changed, 11 insertions, 7 deletions
diff --git a/etc/completions/_devtodo b/etc/completions/_devtodo
index a7c6f05..0d33664 100644
--- a/etc/completions/_devtodo
+++ b/etc/completions/_devtodo
@@ -53,12 +53,12 @@ arg_desc=(
'verbose' '[be verbose]'
'add' '[add item]:item'
'graft' '[parent item]:parent:_index'
- 'link' '[link file into database]:database:_file'
+ 'link' '[link file into database]:database:_files'
'reparent' '[change item parent]:index:_index'
'priority' '[item priority]:priority:_priority'
'edit' '[edit item]:index:_index'
'done' '[mark as done]:index:_index'
- 'not-done' '[mark as undone]:index:_index'
+ 'not-done' '[mark as undone]:index:_index -u'
'global' '[use global database]'
'TODO' '[generate TODO file]'
'all' '[show all items]'
@@ -72,21 +72,25 @@ for arg in ${(k)arg_pair}; {
function _index () {
typeset i
- typeset -a index desc
- for i in $(todo --format display='%n '); do
- index+=${i}:$(todo --format display='%t' $i)
+ typeset -a index desc tdoptions
+ for i in $*; do
+ case $i in
+ -u) tdoptions=(--filter done)
+ esac
+ done
+ for i in $(todo $tdoptions --format display='%n '); do
+ index+=${i}:$(todo $tdoptions --format display='%t' $i)
done
_describe index index
}
function _color () {
- typeset suf
if compset -P '*='; then
_wanted color expl 'color' \
compadd black red green yellow blue magenta cyan white default
else
_wanted item expl 'item' \
- compadd -S'=' veryhigh high medium low verylow title info
+ compadd -S '=' veryhigh high medium low verylow title info
fi
}