about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-08-10 17:18:44 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-08-10 17:18:44 +0000
commit42cd6020ea7eeb2d34ad94a6ea57d0972762fe47 (patch)
treee50decf95acebe98283b5a2be8913dd419941ddc /Completion
parentd2e3b6eb62df229ab1af9e1f260a67516712d88d (diff)
downloadzsh-42cd6020ea7eeb2d34ad94a6ea57d0972762fe47.tar.gz
zsh-42cd6020ea7eeb2d34ad94a6ea57d0972762fe47.tar.xz
zsh-42cd6020ea7eeb2d34ad94a6ea57d0972762fe47.zip
unposted: yet another update to _todo.sh
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_todo.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_todo.sh b/Completion/Unix/Command/_todo.sh
index 0b8b95d2c..65544b25a 100644
--- a/Completion/Unix/Command/_todo.sh
+++ b/Completion/Unix/Command/_todo.sh
@@ -12,7 +12,7 @@
 
 setopt localoptions braceccl
 
-local expl curcontext="$curcontext" state line pri nextstate
+local expl curcontext="$curcontext" state line pri nextstate item
 local -a cmdlist itemlist match mbegin mend
 integer NORMARG
 
@@ -64,7 +64,8 @@ case $state in
 	nextstate=proj
 	;;
 	(replace)
-	compadd -Q -- "${(qq)$(todo.sh -p list "^[ 0]*${words[CURRENT-1]} " | sed '/^--/,$d')##<-> (\([A-Z]\) |)}"
+	item=${words[CURRENT-1]##0##}
+	compadd -Q -- "${(qq)$(todo.sh -p list "^[ 0]*$item " | sed '/^--/,$d')##<-> (\([A-Z]\) |)}"
 	;;
       esac
     fi