fzf-tab icon indicating copy to clipboard operation
fzf-tab copied to clipboard

fzf-tab hl color setting does not take effect

Open Archdsenna opened this issue 1 year ago • 1 comments

My FZF-TAB color configuration does not fully inherit the FZF_DEFAULT_OPTS color setting of fzf, This is my fzf configuration: export FZF_DEFAULT_OPTS="--color fg:23,fg+:23,bg+:151,hl:1,hl+:1,info:23,border:23,gutter:-1,prompt:29,pointer:9,query:0,header:23 \ --height=100% --layout=reverse --info=inline --margin=1 --padding=1 --ansi \ --preview 'bat --style=numbers --color=always {}' --preview-window=right:50% \ --pointer '❯'"

This is the interface of fzf: img_v3_02dg_7b78c216-21e1-44f4-8f66-7198c15a690g

The following is the interface of fzf-tab: img_v3_02dg_5c58bf03-c21f-4874-8ea7-c77af15f046g

You can see that in the matching result of the list, the color of the current item is displayed correctly, but the matching character of the non-current item is not displayed as expected.

In addition, there is a problem, fzf-tab preview prompt error: fork/exec /bin/zsh: invalid argument image

How do I configure hl(not the current list of matching character colors) color in fzf-tab to color 1 out of 256 colors?

Archdsenna avatar Aug 06 '24 14:08 Archdsenna

I have this similar problem.

tab fzf

The font is hard to see. And changing the fg value only works for the fzf.

export FZF_DEFAULT_OPTS=" \
--color=bg+:#ccd0da,spinner:#dc8a78,hl:#d20f39 \
--color=fg:#4c4f69,header:#d20f39,info:#8839ef,pointer:#dc8a78 \
--color=marker:#7287fd,fg+:#4c4f69,prompt:#8839ef,hl+:#d20f39 \
--color=selected-bg:#bcc0cc \
--multi"
completion styling

Dzx1025 avatar Aug 13 '24 12:08 Dzx1025

Don't use FZF_DEFAULT_OPTS and --preview, use fzf-flags and fzf-preview instead.

zstyle ':fzf-tab:*' fzf-flags --color fg:23,fg+:23,bg+:151,hl:1,hl+:1,info:23,border:23,gutter:-1,prompt:29,pointer:9,query:0,header:23 --height=100% --layout=reverse --info=inline --margin=1 --padding=1 --ansi --preview-window=right:50% --pointer '❯'
zstyle ':fzf-tab:*' fzf-preview 'bat --style=numbers --color=always $realpath'

Aloxaf avatar Sep 25 '24 10:09 Aloxaf

Hi @Aloxaf

What if we want to set the color for the tmux popup border? The border attribute above changes the color inside the tmux pop, right?

This cmd below works but outside of fzf-tab:

tmux display-popup -S fg=red

The idea is to customize the border style for completions like cd confi<TAB>

Any idea?

Thanks.

rodhash avatar Jan 08 '25 08:01 rodhash

Ouch .. just found in the docs (popup-style).

rodhash avatar Jan 08 '25 09:01 rodhash