summaryrefslogtreecommitdiff
path: root/etc/completions/_devtodo
diff options
context:
space:
mode:
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 () {
}