junegunn / fzf.vim

fzf :heart: vim
MIT License
9.51k stars 581 forks source link

Let FZF_PREVIEW_COMMAND take over for binary files too #1528

Open PlasmaHH opened 4 months ago

PlasmaHH commented 4 months ago

Using fzf on the command line over the years I have put me together some fzf_preview script that handles various kinds of binary files too (e.g. images through catimg, compressed files by listing directory, packages by content etc.)

However the fzf.vim preview.sh contains a mime type check and if it contains binary, it will not forward things to the configured command.

since the original command line fzf afaik does not handle binary any special it would be most useful if the preview script exist that it is unconditionally forwarded to that in the preview.sh, I did that for myself by wrapping the mime type check in preview.sh with a -z check for the variable.

junegunn commented 3 months ago

Can you open a pull request?