about summary refs log tree commit diff
path: root/Completion/Unix/Command/_todo.sh
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-09-27 14:50:23 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-09-27 14:50:23 +0000
commit11dc3a29cf2556f7b29d3d92570191a3a3c43dbb (patch)
treeb8aa5f3325a27b57aef7e7296665f7eba18dd550 /Completion/Unix/Command/_todo.sh
parent8f982856626fb000ba722373566ec089208ff67c (diff)
downloadzsh-11dc3a29cf2556f7b29d3d92570191a3a3c43dbb.tar.gz
zsh-11dc3a29cf2556f7b29d3d92570191a3a3c43dbb.tar.xz
zsh-11dc3a29cf2556f7b29d3d92570191a3a3c43dbb.zip
22778: basic completion for locate
unposted: fix todo.sh search completion
Diffstat (limited to 'Completion/Unix/Command/_todo.sh')
-rw-r--r--Completion/Unix/Command/_todo.sh8
1 files changed, 7 insertions, 1 deletions
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)