From 11dc3a29cf2556f7b29d3d92570191a3a3c43dbb Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 27 Sep 2006 14:50:23 +0000 Subject: 22778: basic completion for locate unposted: fix todo.sh search completion --- Completion/Unix/Command/_todo.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_todo.sh') diff --git a/Completion/Unix/Command/_todo.sh b/Completion/Unix/Command/_todo.sh index 583aa008c..5d60b9684 100644 --- a/Completion/Unix/Command/_todo.sh +++ b/Completion/Unix/Command/_todo.sh @@ -57,7 +57,13 @@ case $state in ;; (list|listall) - _message search term... + # This completes stuff beginning with p: (projects) or @ (contexts); + # these are todo.sh conventions. + # We should do it for any argument after list or listall, but + # _arguments doesn't make that easy. We need it to tell us + # the position of the first non-option argument. + _wanted search expl 'context or project' \ + compadd ${${=${${(M)${(f)"$(todo.sh list)"}##<-> *}##<-> }}:#^(p:*|@*)} ;; (listpri) -- cgit 1.4.1