1
0
mirror of https://github.com/zsh-users/zsh synced 2024-07-08 19:55:44 +00:00

unposted: yet another update to _todo.sh

This commit is contained in:
Peter Stephenson 2010-08-10 17:18:44 +00:00
parent d2e3b6eb62
commit 42cd6020ea

View File

@ -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