summaryrefslogtreecommitdiffstats
path: root/Completion/compinit
diff options
context:
space:
mode:
authorCharles Blake <charlechaud@gmail.com>2026-04-30 03:20:35 -0400
committerdana <dana@dana.is>2026-05-15 15:04:02 -0500
commit417059e4764ca9694362e1d291d522a9a528bd4e (patch)
treea1f48f5b11ef83568015aa1677e0aa4e56cd863c /Completion/compinit
parentunposted: zsh-merge-changelog: find more context (diff)
downloadzsh-417059e4764ca9694362e1d291d522a9a528bd4e.tar
zsh-417059e4764ca9694362e1d291d522a9a528bd4e.tar.gz
zsh-417059e4764ca9694362e1d291d522a9a528bd4e.tar.bz2
zsh-417059e4764ca9694362e1d291d522a9a528bd4e.tar.lz
zsh-417059e4764ca9694362e1d291d522a9a528bd4e.tar.xz
zsh-417059e4764ca9694362e1d291d522a9a528bd4e.tar.zst
zsh-417059e4764ca9694362e1d291d522a9a528bd4e.zip
54425+54429+54449: compdef -[kK]: avoid forking
Diffstat (limited to 'Completion/compinit')
-rw-r--r--Completion/compinit6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/compinit b/Completion/compinit
index f1280fc60..900900644 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -345,7 +345,7 @@ compdef() {
[[ $2 = .menu-select ]] && zmodload -i zsh/complist
zle -C "$1" "$2" "$func"
if [[ -n $new ]]; then
- bindkey "$3" | IFS=$' \t' read -A opt
+ opt=( ${(z)${ bindkey "$3" }} )
[[ $opt[-1] = undefined-key ]] && bindkey "$3" "$1"
else
bindkey "$3" "$1"
@@ -372,8 +372,8 @@ compdef() {
# And bind the keys...
for i; do
if [[ -n $new ]]; then
- bindkey "$i" | IFS=$' \t' read -A opt
- [[ $opt[-1] = undefined-key ]] || continue
+ opt=( ${(z)${ bindkey "$i" }} )
+ [[ $opt[-1] = undefined-key ]] || continue
fi
bindkey "$i" "$func"
done