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

Re: Rewrite of zsh-newuser-install



On Mon, Feb 22, 2021 at 5:56 AM Paul <GammaFunction@xxxxxxxxxxx> wrote:
>
> On Fri Feb 19, 2021 at 3:38 PM CST, Marlon Richert wrote:
> > I made some more changes. Please try them out and let me know what you
> > think.
> >
> > * https://gitlab.com/marlonrichert/zsh-sensible/-/blob/master/zshrc
>
> I decided to try out some of these, but there seems to be an issue with
> completions, specifically when completing 'functions -<Tab>':
>
> https://i.imgur.com/d7polcy.png
>
> Minimal file which reproduces this issue with 'zsh -f':
>
> ---
>
> zstyle ':completion:*:complete:*' matcher-list 'r:?|[-_]=**'
> zstyle ':completion:*:functions' ignored-patterns '[[:punct:]]*[[:alnum:]]*'
> zmodload zsh/complist
> setopt MENU_COMPLETE
> zstyle ':completion:*:default' menu yes select
> autoload -Uz compinit
> compinit
>
> # plus either of the following two lines:
> zstyle ':completion:*:options' matcher 'b:-=+'
> zstyle ':completion:*:options' matcher 'm:{-}={+}'
>
> ---
>
> This might be an issue with an upstream completion function, but it
> should regardless be fixed before the new newusers is incorporated.

I can reproduce it with just this:

autoload -Uz compinit; compinit
zstyle ':completion:*:functions' ignored-patterns '[[:punct:]]*[[:alnum:]]*'
zstyle ':completion:*:options' matcher 'b:-=+'

The bug also occurs when completing options for `autoload`, but not
for any of the other commands completed by `_typeset`.




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