zsh-workers
 help / color / mirror / code / Atom feed
From: Marlon Richert <marlon.richert@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: [PATCH] Fix a logic bug in _zle
Date: Mon, 31 May 2021 11:50:27 +0300	[thread overview]
Message-ID: <CAHLkEDu=pKddp9wtU8C7++ZqNdq3ajBmfjNnB1TN0pMaBn-QJQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 16 bytes --]

See attachment.

[-- Attachment #2: 0001-Fix-a-logic-bug-in-_zle.txt --]
[-- Type: text/plain, Size: 1033 bytes --]

From 1b0bf4e25de818894e4374a7bad4e07f2f2a5e48 Mon Sep 17 00:00:00 2001
From: Marlon Richert <marlon.richert@gmail.com>
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)


             reply	other threads:[~2021-05-31  8:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31  8:50 Marlon Richert [this message]
2021-05-31 17:08 ` Bart Schaefer
2021-05-31 17:48   ` Marlon Richert
2021-05-31 21:56     ` Bart Schaefer
2021-06-01  8:53       ` Marlon Richert
2021-07-18 22:31         ` Lawrence Velázquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHLkEDu=pKddp9wtU8C7++ZqNdq3ajBmfjNnB1TN0pMaBn-QJQ@mail.gmail.com' \
    --to=marlon.richert@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).