Skip to content

Commit

Permalink
fix: always ignore FZF_DEFAULT_OPTS
Browse files Browse the repository at this point in the history
FZF_DEFAULT_OPTS causes too many bugs.
use fzf-flags and fzf-preview instead.

close #455
close #461
  • Loading branch information
Aloxaf committed Sep 25, 2024
1 parent 0ef51dc commit 0b49f3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/-ftb-fzf
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fi

_ftb_query="${_ftb_query}$(command "$dd" bs=1G count=1 status=none iflag=nonblock < /dev/tty 2>/dev/null)" || true

SHELL=$ZSH_NAME $fzf_command \
FZF_DEFAULT_OPTS='' SHELL=$ZSH_NAME $fzf_command \
--ansi \
--bind=$binds \
--bind="${switch_group[1]}:reload($reload_command -1),${switch_group[2]}:reload($reload_command 1)" \
Expand Down
2 changes: 1 addition & 1 deletion lib/ftb-tmux-popup
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fi
popup_width=$(( min(max(comp_length + 5, popup_min_size[1]), window_width) ))
popup_x=$(( cursor_x + popup_width > window_width ? window_width - popup_width : cursor_x ))

echo -E "env SHELL=$ZSH_NAME $commands[fzf] ${(qq)fzf_opts[@]} < $tmp_dir/completions.$$ > $tmp_dir/result-$$" > $tmp_dir/fzf-$$
echo -E "env FZF_DEFAULT_OPTS='' SHELL=$ZSH_NAME $commands[fzf] ${(qq)fzf_opts[@]} < $tmp_dir/completions.$$ > $tmp_dir/result-$$" > $tmp_dir/fzf-$$
{
tmux popup -x $popup_x -y $popup_y \
-w $popup_width -h $popup_height \
Expand Down

0 comments on commit 0b49f3e

Please sign in to comment.