From 9d2b2de49483504dfe94b74524b02f64d42c08c2 Mon Sep 17 00:00:00 2001 From: "P.C. Shyamshankar" Date: Fri, 15 May 2009 14:21:24 +0800 Subject: [PATCH] Updated completion for 1.7.0, dynamically getting subcommands from task. Signed-off-by: Paul Beckingham --- completion/_task | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/completion/_task b/completion/_task index 8344dad16..e53389ccb 100644 --- a/completion/_task +++ b/completion/_task @@ -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 } -