summaryrefslogtreecommitdiff
path: root/etc/completions/_devtodo
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-09-17 14:33:53 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-09-17 14:33:53 +0200
commitaff439744dc773605c2bf202c34aa42592445504 (patch)
tree4c90e7e306039e6851e7c889dc35be3c42d66c64 /etc/completions/_devtodo
parent84c547836db72156e828eeaf7af2d72859e6528e (diff)
devtodo completion: Added completion for colors
(Only partially working)
Diffstat (limited to 'etc/completions/_devtodo')
-rw-r--r--etc/completions/_devtodo15
1 files changed, 15 insertions, 0 deletions
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 () {