From ca2e71e0eba4852bd91c620bf72b00198f309f12 Mon Sep 17 00:00:00 2001 From: Marlon Richert Date: Mon, 6 Sep 2021 12:48:53 -0700 Subject: 48969: fix for "zle -N" completion --- ChangeLog | 2 ++ Completion/Zsh/Command/_zle | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50f719fce..58822495e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2021-09-06 Bart Schaefer + * Marlon Richert: 48969: fix for "zle -N" completion + * 48888: Doc/Zsh/mod_system.yo, Doc/Zsh/params.yo, Test/E03posix.ztst: improve doc for $$ and $PPID, add fail test for PPID readonly-ness diff --git a/Completion/Zsh/Command/_zle b/Completion/Zsh/Command/_zle index e01d0a943..0b8ef7a15 100644 --- a/Completion/Zsh/Command/_zle +++ b/Completion/Zsh/Command/_zle @@ -51,11 +51,11 @@ case "$state[1]" in ;; (widget*) _wanted -C "$context[1]" widgets expl "${state_descr[1]:-widget}" _widgets && ret=0 - ;& - (function) - [[ $state[1] != *function ]] || # Handle fall-through + ;| + (*function) _wanted -C "$context[1]" functions expl 'widget shell function' \ - compadd -M 'r:|-=* r:|=*' -k functions && ret=0 + compadd -M 'r:|-=* r:|=*' -k functions && + ret=0 ;; (comp-widget) _wanted -C "$context[1]" widgets expl 'completion widget' \ -- cgit 1.4.1