From aff439744dc773605c2bf202c34aa42592445504 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 17 Sep 2008 14:33:53 +0200 Subject: devtodo completion: Added completion for colors (Only partially working) --- etc/completions/_devtodo | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'etc/completions') diff --git a/etc/completions/_devtodo b/etc/completions/_devtodo index e05dd2c..5d964d4 100644 --- a/etc/completions/_devtodo +++ b/etc/completions/_devtodo @@ -5,6 +5,7 @@ typeset -a arg_generic arg_add typeset -A arg_pair arg_desc +typeset expl arg_add=( '-p[priority]:priority:_priority' @@ -78,7 +79,21 @@ function _index () { _describe index index } +function _item () { + _wanted item expl 'item' \ + compadd veryhigh high medium low verylow title info +} + function _color () { + typeset suf + if compset -P '*='; then + _wanted color expl 'color' \ + compadd black red green yellow blue magenta cyan white default + else + compset -S '=*' || suf='=' + _wanted item expl 'item' \ + _combination -s '[:=]' item item-color item -S $suf -q "$@" - + fi } function _format () { -- cgit v1.2.3