summaryrefslogtreecommitdiff
path: root/etc/completions
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-09-05 16:16:06 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-09-05 16:16:06 +0200
commit7bfc883fafa4360c43e9f17f3bd648c9c74fdff5 (patch)
tree4c9f47511ee03cee16873e9900af4f36acd60289 /etc/completions
parentb0736af7f9c79076addaec2f621f2aa9b2a02eb7 (diff)
todo comptetion: Finished arguments
Diffstat (limited to 'etc/completions')
-rw-r--r--etc/completions/_devtodo40
1 files changed, 40 insertions, 0 deletions
diff --git a/etc/completions/_devtodo b/etc/completions/_devtodo
index 9015acf..c1dd516 100644
--- a/etc/completions/_devtodo
+++ b/etc/completions/_devtodo
@@ -32,6 +32,43 @@ arg_generic=(
'--purge[purge completed items]:days: '
)
+arg_pair=(
+ 'verbose' 'v'
+ 'add' 'a'
+ 'graft' 'g'
+ 'link' 'l'
+ 'reparent' 'R'
+ 'priority' 'p'
+ 'edit' 'e'
+ 'done' 'd'
+ 'not-done' 'D'
+ 'global' 'G'
+ 'TODO' 'T'
+ 'all' 'A'
+ 'filter' 'f'
+)
+
+arg_desc=(
+ 'verbose' '[be verbose]'
+ 'add' '[add item]:item'
+ 'graft' '[parent item]:parent:_index'
+ 'link' '[link file into database]:database:_file'
+ 'reparent' '[change item parent]:index:_index'
+ 'priority' '[item priority]:priority:_priority'
+ 'edit' '[edit item]:index:_index'
+ 'done' '[mark as done]:index:_index'
+ 'not-done' '[mark as undone]:index:_index'
+ 'global' '[use global database]'
+ 'TODO' '[generate TODO file]'
+ 'all' '[show all items]'
+ 'filter' '[show items matching filter]:filter'
+)
+
+for arg in ${(k)arg_pair}; {
+ arg_generic+='(--'$arg')-'${arg_pair[$arg]}${arg_desc[$arg]}
+ arg_generic+='(-'${arg_pair[$arg]}')--'${arg}${arg_desc[$arg]}
+}
+
function _index () {
typeset i
typeset -a index desc
@@ -47,6 +84,9 @@ function _color () {
function _format () {
}
+function _priority () {
+}
+
case $service in
tda) _arguments -s $arg_add ;;
tde|tdd) _arguments -s ':index:_index' ;;