From bdbdf2e8e0d376a60df40c6c9d3d2632e1680376 Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 18 May 2026 20:52:44 -0400 Subject: [PATCH] fix(fzf): omit --preview-wrap-sign on older fzf builds preview-wrap-sign is unavailable in fzf 0.60 devel. Reuse the existing _fzf_transform_action gate to conditionally append it to the history widget base options, keeping parity with the wrap-word and bg-transform fallbacks. --- integrations/fzf.fish | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integrations/fzf.fish b/integrations/fzf.fish index f376650..65767c0 100644 --- a/integrations/fzf.fish +++ b/integrations/fzf.fish @@ -191,8 +191,12 @@ function fzf_key_bindings set -l -- total_lines (count $command_line) set -l -- fzf_query (string escape -- $command_line[$current_line]) + # preview-wrap-sign requires newer fzf; omit it on older builds + set -l _fzf_preview_wrap_sign '' + test "$_fzf_transform_action" = bg-transform; and set _fzf_preview_wrap_sign ' --preview-wrap-sign="↳ "' + set -lx -- FZF_DEFAULT_OPTS (__fzf_defaults '' \ - '--nth=2..,.. --scheme=history --multi --no-multi-line --no-wrap --wrap-sign="\t\t\t↳ " --preview-wrap-sign="↳ "' \ + '--nth=2..,.. --scheme=history --multi --no-multi-line --no-wrap --wrap-sign="\t\t\t↳ "'$_fzf_preview_wrap_sign \ '--bind=\'shift-delete:execute-silent(for i in (string split0 -- <{+f}); eval builtin history delete --exact --case-sensitive -- (string escape -n -- $i | string replace -r "^\d*\\\\\\t" ""); end)+reload(eval $FZF_DEFAULT_COMMAND)\'' \ '--bind="alt-enter:become(string join0 -- (string collect -- {+2..} | fish_indent -i))"' \ "--bind=ctrl-r:toggle-sort,alt-r:toggle-raw --highlight-line $FZF_CTRL_R_OPTS" \