From 7bfc883fafa4360c43e9f17f3bd648c9c74fdff5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 5 Sep 2008 16:16:06 +0200 Subject: todo comptetion: Finished arguments --- etc/completions/_devtodo | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'etc/completions') 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' ;; -- cgit v1.2.3