Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Fix a logic bug in _zle



See attachment.
From 1b0bf4e25de818894e4374a7bad4e07f2f2a5e48 Mon Sep 17 00:00:00 2001
From: Marlon Richert <marlon.richert@xxxxxxxxx>
Date: Mon, 31 May 2021 11:46:21 +0300
Subject: [PATCH] Fix a logic bug in _zle

---
 Completion/Zsh/Command/_zle | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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' \
-- 
2.30.1 (Apple Git-130)



Messages sorted by: Reverse Date, Date, Thread, Author