about summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix')
-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