From: Marlon Richert <marlon.richert@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] Fix a logic bug in _zle
Date: Mon, 31 May 2021 20:48:28 +0300 [thread overview]
Message-ID: <CAHLkEDsedEs-O-6OLaFPdPOGM33n4A9px2sqCtm_rEFA49qmsw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7YHiEnxSNh65Z4K+Fuz+x_KyZZycZnUG1ArfhF6hQirmg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
On Mon, May 31, 2021 at 8:08 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> For purposes of the commit log, we should be told what this means in
> terms of a behavior change.
Is it good enough this way?
[-- Attachment #2: 0001-Fix-a-bug-where-if-state-1-widget-function-_zle-woul.txt --]
[-- Type: text/plain, Size: 1087 bytes --]
From f3be8c5cefd5251ad9317fe5ca11a400f6e9ffe1 Mon Sep 17 00:00:00 2001
From: Marlon Richert <marlon.richert@gmail.com>
Date: Mon, 31 May 2021 20:45:58 +0300
Subject: [PATCH] Fix a bug where, if $state[1] == widget-function, _zle would
always return 0
---
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)
next prev parent reply other threads:[~2021-05-31 17:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-31 8:50 Marlon Richert
2021-05-31 17:08 ` Bart Schaefer
2021-05-31 17:48 ` Marlon Richert [this message]
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=CAHLkEDsedEs-O-6OLaFPdPOGM33n4A9px2sqCtm_rEFA49qmsw@mail.gmail.com \
--to=marlon.richert@gmail.com \
--cc=schaefer@brasslantern.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).