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

Re: Duplicate results in _python - (Re: [MINOR BUG] Duplicate results in tab-menu)



Regarding the workaround, as far as I can see `zstyle ':completion::complete:python<->#(.<->)#::*' list-dirs-first false` doesn't actually fix the problem.

`zstyle ':completion::complete:python3::*' list-dirs-first false` does however, though obviously only for python3.

Morten

On Thu, Jun 23, 2022 at 4:42 PM Eric Cook <llua@xxxxxxx> wrote:
On 6/23/22 05:54, Morten Nissov wrote:
> Hi,
>
> Others in the IRC hadn't experienced this bug so I'm asking here.
>
> In some cases, when I tab to open the menu everything is duplicated, see below for example
> image.png
> I've found this happens when my .zshrc contains
>
>     |zstyle ':completion:*:matches' group 'yes' zstyle ':completion:*' group-name '' zstyle ":completion:*" list-dirs-first true autoload -U compinit && compinit
>     |
>
>
> Best regards,
> Morten

Just the group-name and list-dirs-first styles being empty string and true are needed to cause the problem.

with ''python foo'' _python makes its way to _normal, returns (seemingly true) then compsys calls _default to
complete -default- for some reason that i am unsure of.

as a workaround disabling list-dirs-first for python would prevent the duplicates from happening:
zstyle ':completion::complete:python<->#(.<->)#::*' list-dirs-first false

but even with that, compsys seems to still tries to complete -default-.



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