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

Bug in compdescribe with matcher 'b:-=+'



(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