diff options
author | Ulysse Buonomo <buonomo.ulysse@gmail.com> | 2023-09-26 11:59:55 -0500 |
---|---|---|
committer | Matthew Martin <phy1729@gmail.com> | 2023-10-29 17:36:29 -0500 |
commit | 97e43105637d92c20cdf0eb60577329af681d870 (patch) | |
tree | a2d1fabc0f477af72c065421832404ad3d0ffa87 /Completion | |
parent | f36fccbb84e5d36ebdecede0c29e8e0c588336c9 (diff) | |
download | zsh-97e43105637d92c20cdf0eb60577329af681d870.tar.gz zsh-97e43105637d92c20cdf0eb60577329af681d870.tar.xz zsh-97e43105637d92c20cdf0eb60577329af681d870.zip |
github #102: Ensure todo.sh completion uses builtin commands
the `todo.sh` script allows redefining commands locally, which can mess up this completion script. We are using the `command` subcommand to avoid that.
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Unix/Command/_todo.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_todo.sh b/Completion/Unix/Command/_todo.sh index 99b6bb695..e26bfc94f 100644 --- a/Completion/Unix/Command/_todo.sh +++ b/Completion/Unix/Command/_todo.sh @@ -97,7 +97,7 @@ case $state in ;; (replace) item=${words[CURRENT-1]##0##} - compadd -Q -- "${(qq)$(todo.sh -p list "^[ 0]*$item " | sed '/^--/,$d')##<-> (\([A-Z]\) |)}" + compadd -Q -- "${(qq)$(todo.sh -p command list "^[ 0]*$item " | sed '/^--/,$d')##<-> (\([A-Z]\) |)}" ;; esac fi @@ -144,7 +144,7 @@ case $nextstate in ;; (item) - itemlist=(${${(M)${(f)"$(todo.sh -p list | sed '/^--/,$d')"}##<-> *}/(#b)(<->) (*)/${match[1]}:${match[2]}}) + itemlist=(${${(M)${(f)"$(todo.sh -p command list | sed '/^--/,$d')"}##<-> *}/(#b)(<->) (*)/${match[1]}:${match[2]}}) _describe -t todo-items 'todo item' itemlist ;; @@ -173,6 +173,6 @@ case $nextstate in # the + or @ (which may not even be there yet). compset -P '*[[:space:]]' _wanted search expl $projmsg \ - compadd $(todo.sh lsprj) $(todo.sh lsc) + compadd $(todo.sh command listproj) $(todo.sh command listcon) ;; esac |