@ 261105.2

261101.1 · 07fce8ac8dffba4e11f1cbe5490d730a2cc5ec7a

fix(git): fix fish preview quoting for special char paths

git_preview() wrapped preview commands in `sh -c '...'` on fish to work around fish resetting `$COLUMNS` (delta width, #1023). fzf substitutes placeholders such as `{-1}` after `--preview` is passed, so fzf's quoted path was inserted inside the outer single quotes. Paths containing shell special characters (e.g. parentheses) then broke the command (`sh: Syntax error: "(" unexpected`), while simple paths happened to work.

The wrapper is no longer needed: use fzf's `$FZF_PREVIEW_COLUMNS` for the delta pager, which fzf exports explicitly and shells do not reset. Skim does not provide the FZF variables to preview commands, so select `$COLUMNS` when the picker runs on skim. Pass resolved opts through pager functions so the correct variable is chosen per picker.

Add a git_diff regression test for a `(dir)/file.tsx` path. The test uses fish when available and falls back to an `sh` symlink named `fish` so the fish-only code path is also covered in CI images without fish. Also cover the pager variable selection for fzf and skim.

Fixes #2846

reading declarations

Changes to doc/fzf-lua.txt. All files

doc/fzf-lua.txt

@@ -789,8 +789,8 @@ CUSTOMIZATION                                          *fzf-lua-customization*           diff_opts = { ctxlen = 3 },           -- git-delta is automatically detected as pager, set `pager=false`           -- to disable, can also be set under 'lsp.code_actions.preview_pager'-          -- recommended styling for delta-          --pager = [[delta --width=$COLUMNS --hunk-header-style="omit" --file-style="omit"]],+          -- recommended styling for delta (use `$COLUMNS` with skim)+          --pager = [[delta --width=$FZF_PREVIEW_COLUMNS --hunk-header-style="omit" --file-style="omit"]],         },     } <