Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.19k stars 94 forks source link

[BUG] Preview window still displayed for some commands options and arguments #319

Closed xfzv closed 1 year ago

xfzv commented 1 year ago

Describe the bug

Despite using

zstyle ':fzf-tab:complete:*:options' fzf-preview
zstyle ':fzf-tab:complete:*:argument-1' fzf-preview

, the preview window is still displayed for some commands options and arguments such as chezmoi or kitty:


No issue with most binaries installed from the official Arch repositories, here lsd -- <TAB> for example:

image


I can make sure:

To Reproduce

Steps to reproduce the behavior:

  1. On Arch Linux (also happens on my Gentoo install), install bat or lsd ; chezmoi or kitty from official Arch repositories
  2. Use
    zstyle ':fzf-tab:complete:*:options' fzf-preview
    zstyle ':fzf-tab:complete:*:argument-1' fzf-preview
  3. Type lsd -- or bat -- and press <TAB> -> the preview window isn't drawn
  4. Type chezmoi or kitty -- and press <TAB> -> the preview window is drawn

Expected behavior

The preview window shouldn't be drawn for chezmoi and kitty --

Environment:

Are there other zstyle that I could use to avoid this?

Thanks!

Aloxaf commented 1 year ago

This is not a bug. Setting context when doing completion is just a convention, not a rule.

You can disable preview for these tools individually.

zstyle ':fzf-tab:complete:chezmoi:*' fzf-preview
zstyle ':fzf-tab:complete:kitty:*' fzf-preview
xfzv commented 1 year ago

This is not a bug. Setting context when doing completion is just a convention, not a rule.

You can disable preview for these tools individually.

Thank you,

zstyle ':fzf-tab:complete:chezmoi:*' fzf-preview
zstyle ':fzf-tab:complete:kitty:*' fzf-preview

works fine.