summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/completions/_devtodo2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/completions/_devtodo b/etc/completions/_devtodo
index 7795da6..7a3f326 100644
--- a/etc/completions/_devtodo
+++ b/etc/completions/_devtodo
@@ -92,7 +92,7 @@ function _todo_index () {
number=${entry%%:*}
depth=$(( ${#number} - ${#${number// }} ))
# FIXME the subscripts operate on the string instead of the array
- ((depth)) && entry=${(j:.:)${${(s:.:)${last_entry%%:*}#.}[1,$depth]}}.$entry
+ ((depth)) && entry=${(j:.:)${${(s:.:):-a.${last_entry%%:*}}[2,depth+1]}}.$entry
text=${entry#*:}
number=${${entry%%:*}// }
entry=$number:$text