diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-12-06 17:05:04 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-12-06 17:05:04 +0100 |
commit | 3aa9b34807054113b0a75141ce95549e4c4b316b (patch) | |
tree | abe6cfea311441cf00bbb2ea2620b64be87f96ca /etc/completions/_devtodo | |
parent | c53f7abe6cb04c6fc468e70572320173b74ac250 (diff) |
devtodo completion: Minor style fix
Diffstat (limited to 'etc/completions/_devtodo')
-rw-r--r-- | etc/completions/_devtodo | 13 |
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 |