From 3aa9b34807054113b0a75141ce95549e4c4b316b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 6 Dec 2008 17:05:04 +0100 Subject: devtodo completion: Minor style fix --- etc/completions/_devtodo | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'etc/completions/_devtodo') 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 ## 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 -- cgit v1.2.3