- added conjunctions to zsh tab completion
This commit is contained in:
Johannes Schlatow 2011-09-16 15:12:17 +02:00
parent db279ee237
commit b018042130

View file

@ -47,6 +47,13 @@ _task_modifiers=(
'word' \ 'word' \
'noword' 'noword'
) )
_task_conjunctions=(
'and' \
'or' \
'xor' \
'\)'
'\('
)
_task_cmds=($(task _commands)) _task_cmds=($(task _commands))
_task_zshcmds=( ${(f)"$(task _zshcommands)"} ) _task_zshcmds=( ${(f)"$(task _zshcommands)"} )
@ -175,6 +182,9 @@ _regex_arguments _task_attributes "${args[@]}"
(( $+functions[_task_filter] )) || (( $+functions[_task_filter] )) ||
_task_filter() { _task_filter() {
_task_attributes "$@" _task_attributes "$@"
# TODO complete conjunctions only if the previous word is a filter expression, i.e. attribute, ID, any non-command
_describe -t default 'task conjunctions' _task_conjunctions
} }
# merge completion # merge completion