diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/completions/_devtodo | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/etc/completions/_devtodo b/etc/completions/_devtodo index 05d1172..80b99f4 100644 --- a/etc/completions/_devtodo +++ b/etc/completions/_devtodo @@ -18,31 +18,31 @@ for ((i=2; i <= $#words; i++)) { priorities=(verylow low medium high veryhigh) arg_add=( - '-p[priority]:priority:_priority' - '-g[parent item]:parent:_index' + '-p[priority]:priority:_todo_priority' + '-g[parent item]:parent:_todo_index' ) arg_generic=( - '--remove[remove items]:index:_index' + '--remove[remove items]:index:_todo_index' '--database[database file]:file:_files' '--global-database[global database file]:file:_files' - '*--colour[item color]:color:_color' + '*--colour[item color]:color:_todo_color' '--force-colour[force use of colors]' '--mono[no colors]' '--help[display help]' '--version[display version]' '--title[todo title]:string: ' '--date-format[strftime time formet]:time string: ' - '*--format[define format]:format:_format' - '*--use-format[output format]:format:_format' - '--sort[sort database]:sort expression:_sort' + '*--format[define format]:format:_todo_format' + '*--use-format[output format]:format:_todo_format' + '--sort[sort database]:sort expression:_todo_sort' '--paranoid[paranoid parmissions etc]' '--database-loaders[loader order]:database loader: ' '--backup[backup database]:count: ' '--timeout[display timeout]:seconds: ' '--purge[purge completed items]:days: ' - '*'{'--filter','-f'}'[show items matching filter]:filter:_filter' -# '*::item:_index' + '*'{'--filter','-f'}'[show items matching filter]:filter:_todo_filter' +# '*::item:_todo_index' ) arg_pair=( @@ -63,13 +63,13 @@ arg_pair=( arg_desc=( 'verbose' '[be verbose]' 'add' '[add item]:item' - 'graft' '[parent item]:parent:_index' + 'graft' '[parent item]:parent:_todo_index' 'link' '[link file into database]:database:_files' - '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 -u' + 'reparent' '[change item parent]:index:_todo_index' + 'priority' '[item priority]:priority:_todo_priority' + 'edit' '[edit item]:index:_todo_index' + 'done' '[mark as done]:index:_todo_index' + 'not-done' '[mark as undone]:index:_todo_index -u' 'global' '[use global database]' 'TODO' '[generate TODO file]' 'all' '[show all items]' @@ -80,7 +80,7 @@ for arg in ${(k)arg_pair}; { arg_generic+='(-'${arg_pair[$arg]}')--'${arg}${arg_desc[$arg]} } -function _index () { +function _todo_index () { typeset i typeset -a index desc for i in $*; do @@ -94,7 +94,7 @@ function _index () { _describe -t items index index } -function _color () { +function _todo_color () { if compset -P '*='; then _wanted color expl 'color' \ compadd black red green yellow blue magenta cyan white default @@ -104,7 +104,7 @@ function _color () { fi } -function _filter { +function _todo_filter { typeset prefix if [[ ${#${words[$CURRENT]}} -gt 0 ]] { prefix=${${words[$CURRENT]}[1]} @@ -117,7 +117,7 @@ function _filter { } } -function _format () { +function _todo_format () { typeset prefix if [[ -prefix *= ]] { _message 'format string' @@ -127,12 +127,12 @@ function _format () { } } -function _priority () { +function _todo_priority () { _wanted priority expl 'priority' \ compadd default $priorities } -function _sort () { +function _todo_sort () { typeset -a keys used_prefixes typeset key prefix='' keys=(created completed text priority duration none done) @@ -156,11 +156,11 @@ case $service in _arguments -s $arg_add ;; tde|tdd) - _arguments -s ':index:_index' + _arguments -s ':index:_todo_index' ;; tdr) zstyle ':completion:*:tdr:*' ignore-line yes - _arguments -s '*:index:_index' + _arguments -s '*:index:_todo_index' ;; *todo) _arguments -s $arg_generic |