Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug in compdescribe with matcher 'b:-=+'
- X-seq: zsh-workers 48091
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Marlon Richert <marlon.richert@xxxxxxxxx>
- Cc: Paul <GammaFunction@xxxxxxxxxxx>, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, dana <dana@xxxxxxx>, Oliver Kiddle <opk@xxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Bug in compdescribe with matcher 'b:-=+'
- Date: Mon, 22 Feb 2021 08:31:42 -0800
- Archived-at: <https://zsh.org/workers/48091>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-02/CAH%2Bw%3D7ZN2vS5H67PHQ6j5ecmeP3YU5W%2BgT1uBb81c4CGdPhjrA%40mail.gmail.com>
- In-reply-to: <CAHLkEDuqOAJqMdCx0Jgzcpz+5e4OhNrvJaa5=PpqwR-UkzKLOA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDvOw87fPt9W9tXCEZda3psvmKipvXoX+MaDt6+EqbHH-g@mail.gmail.com> <C9FR7XFN5KB4.1N0C49A760PB2@kbvv> <CAHLkEDuqOAJqMdCx0Jgzcpz+5e4OhNrvJaa5=PpqwR-UkzKLOA@mail.gmail.com>
(Was zsh-newuser-install)
On Mon, Feb 22, 2021 at 12:14 AM Marlon Richert
<marlon.richert@xxxxxxxxx> wrote:
>
> On Mon, Feb 22, 2021 at 5:56 AM Paul <GammaFunction@xxxxxxxxxxx> wrote:
> >
> > https://i.imgur.com/d7polcy.png
>
> I can reproduce it with just this:
>
> autoload -Uz compinit; compinit
> zstyle ':completion:*:functions' ignored-patterns '[[:punct:]]*[[:alnum:]]*'
> zstyle ':completion:*:options' matcher 'b:-=+'
When the matcher 'b:-=+' is present, this test at line 129 of _describe:
+_describe:129> compdescribe -g csl2 _args _tmpm _tmpd
which is the conditional for a "while" loop, succeeds 17 times, each
time executing
+_describe:134> compadd -E10 -Q -M 'r:|[_-]=* r:|=*' -M 'b:-=+'
-J -default- -X option -d _tmpd -a _tmpm
This results in 30 matches being generated, instead of the 9 when that
matcher is omitted (in which case compdescribe never succeeds).
I believe the issue is that compdescribe ("cd_get" in
Src/Zle/computil.c) is not propagating the correct description into
_tmpd, but that's the extent of my understanding of these internals.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author