From b018042130a267f50371f5c5eb4943506e7864e2 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Fri, 16 Sep 2011 15:12:17 +0200 Subject: [PATCH] Scripts - added conjunctions to zsh tab completion --- scripts/zsh/_task | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/zsh/_task b/scripts/zsh/_task index 49a96ded0..ffb111ac6 100644 --- a/scripts/zsh/_task +++ b/scripts/zsh/_task @@ -47,6 +47,13 @@ _task_modifiers=( 'word' \ 'noword' ) +_task_conjunctions=( + 'and' \ + 'or' \ + 'xor' \ + '\)' + '\(' +) _task_cmds=($(task _commands)) _task_zshcmds=( ${(f)"$(task _zshcommands)"} ) @@ -175,6 +182,9 @@ _regex_arguments _task_attributes "${args[@]}" (( $+functions[_task_filter] )) || _task_filter() { _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