tinted-theming / tinted-fzf

base16 colorschemes for fzf
https://github.com/base16-project/base16
MIT License
135 stars 9 forks source link

[BUG] ANSI colors overwrite existing FZF_DEFAULT_OPTS #25

Closed screwyprof closed 14 hours ago

screwyprof commented 18 hours ago

When using the ANSI color script (ansi/ansi.sh), it overwrites all existing FZF_DEFAULT_OPTS instead of appending to them:

Current behavior in ansi.sh

export FZF_DEFAULT_OPTS=" \
 --color=bg:0,fg:7,hl:3\
 --color=bg+:8,fg+:7,hl+:11\
 --color=info:3,border:3,prompt:4\
 --color=pointer:0,marker:9,spinner:9,header:1"

This means any existing options (like --multi, --height, etc.) are lost when the ANSI colors are applied.

Suggested Fix

Append the colors to existing options instead:

export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \
 --color=bg:0,fg:7,hl:3\
 --color=bg+:8,fg+:7,hl+:11\
 --color=info:3,border:3,prompt:4\
 --color=pointer:0,marker:9,spinner:9,header:1"

This matches how the hex color themes in sh/ directory work and preserves user's existing FZF options.

JamyGolden commented 14 hours ago

Thanks for spotting! I've just merged a fix: https://github.com/tinted-theming/tinted-fzf/pull/26