Skip to content

[Documentation] preview cmd variables must be exported to be read by _fzf_preview_file #316

@Susensio

Description

@Susensio

This took me a while to debug.
When setting fzf_preview_file_cmd and fzf_preview_dir_cmd as stated in https://github.com/PatrickF1/fzf.fish#change-how-search-directory-previews-directories-and-regular-files example:

set fzf_preview_dir_cmd eza --all --color=always
set fzf_preview_file_cmd cat -n

those settings are not honored. This is because (I think) _fzf_preview_file is executed in a subshell by fzf.

I've tried to export those variables:

set -x fzf_preview_dir_cmd eza --all --color=always
set -x fzf_preview_file_cmd cat -n

with no luck

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions