Updated completion for 1.7.0, dynamically getting subcommands from task.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
P.C. Shyamshankar 2009-05-15 14:21:24 +08:00 committed by Paul Beckingham
parent f974e33fa4
commit 9d2b2de494

View file

@ -1,9 +1,12 @@
#compdef task
# zsh completion for task as of 1.6.0
# zsh completion for task
# P.C. Shyamshankar
typeset -g _task_cmds
_task_cmds=(add append annotate completed description description delete undelete info start stop done undo projects tags summary history ghistory next calendar active overdue stats import export color version help list long ls newest oldest)
_task_cmds=($(task rubbish-command | sed -n -e 's/^\s\+task \(\w\+\) .*/\1/p' | grep -v ID))
# As of task 1.7.0,
# _task_cmds=(add append annotate completed edit duplicate delete undelete info start stop done undo projects tags summary timesheet history ghistory next calendar active overdue stats import export color version help list long ls newest oldest)
_task() {
_arguments -s -S \
@ -29,4 +32,3 @@ _task_commands() {
return ret
fi
}