summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/completions/_devtodo13
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/completions/_devtodo b/etc/completions/_devtodo
index b3652a1..0336654 100644
--- a/etc/completions/_devtodo
+++ b/etc/completions/_devtodo
@@ -3,7 +3,8 @@
## Daniel Friesel <derf@derf.homelinux.org>
## https://derf.homelinux.org/~derf/dotfiles/completion/_devtodo
-typeset -a arg_generic arg_add todo_opts
+typeset -a arg_generic arg_add todo_opts \
+ priorities
typeset -A arg_pair arg_desc
typeset -i i
typeset expl
@@ -14,6 +15,8 @@ for ((i=2; i <= $#words; i++)) {
}
}
+priorities=(verylow low medium high veryhigh)
+
arg_add=(
'-p[priority]:priority:_priority'
'-g[parent item]:parent:_index'
@@ -97,7 +100,7 @@ function _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 '=' $priorities title info
fi
}
@@ -106,11 +109,11 @@ function _filter {
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
+ compadd -p $prefix -- all children done $priorities
} else {
# XXX the '-' makes problems
_wanted expression expl 'filter expression' \
- compadd -S '' -- - + = all children done veryhigh high medium low verylow
+ compadd -S '' -- - + = all children done $priorities
}
}
@@ -119,7 +122,7 @@ function _format () {
function _priority () {
_wanted priority expl 'priority' \
- compadd default veryhigh high medium low verylow
+ compadd default $priorities
}
case $service in