summaryrefslogtreecommitdiff
path: root/etc/completions/_devtodo
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-09-30 15:26:49 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-09-30 15:26:49 +0200
commitc0de10e4afd024d5c8aab1664e9d0e8c252a1699 (patch)
treeb6fb09eece0f1792301ed21fb2cd749aae5ebbc0 /etc/completions/_devtodo
parent5bf64815ee1b34241b1e65cbc9a5979946ff96d6 (diff)
devtodo completion: Added (buggy) completion for --filter
Diffstat (limited to 'etc/completions/_devtodo')
-rw-r--r--etc/completions/_devtodo16
1 files changed, 15 insertions, 1 deletions
diff --git a/etc/completions/_devtodo b/etc/completions/_devtodo
index e18e809..5230078 100644
--- a/etc/completions/_devtodo
+++ b/etc/completions/_devtodo
@@ -31,7 +31,8 @@ arg_generic=(
'--backup[backup database]:count: '
'--timeout[display timeout]:seconds: '
'--purge[purge completed items]:days: '
- '*'{'--filter','-f'}'[show items matching filter]:filter'
+ '*'{'--filter','-f'}'[show items matching filter]:filter:_filter'
+# '*::item:_index'
)
arg_pair=(
@@ -93,6 +94,19 @@ function _color () {
fi
}
+function _filter {
+ typeset prefix
+ if [[ ${#${words[$CURRENT]}} -gt 0 ]] {
+ prefix=${${words[$CURRENT]}[1]}
+ _wanted expression expl 'filter expression' \
+ compadd -p $prefix -- all children done veryhigh high medium low verylow
+ } else {
+ # XXX the '-' makes problems
+ _wanted expression expl 'filter expression' \
+ compadd -S '' -- - + = all children done veryhigh high medium low verylow
+ }
+}
+
function _format () {
}