Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ANSI colors overwrite existing FZF_DEFAULT_OPTS #25

Closed
screwyprof opened this issue Nov 17, 2024 · 1 comment
Closed

[BUG] ANSI colors overwrite existing FZF_DEFAULT_OPTS #25

screwyprof opened this issue Nov 17, 2024 · 1 comment
Assignees

Comments

@screwyprof
Copy link

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
Copy link
Member

Thanks for spotting! I've just merged a fix: #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants