Skip to content

Do fzf_preview_dir_cmd and fzf_preview_file_cmd need to be exported? #305

@TheFunctionalGuy

Description

@TheFunctionalGuy

Describe the bug

Using set fzf_preview_dir_cmd exa --all --color=always or set fzf_preview_file_cmd cat -n in config.fish has no effect on the actual preview.

To fix this I needed to use set --export fzf_preview_dir_cmd exa --all --color=always instead.

Steps to reproduce

  1. Add set fzf_preview_dir_cmd exa --all --color=always to your config.fish
  2. Start new shell so that config.fish gets sourced
  3. Press Ctrl+Alt+F
  4. Get no colored exa output but the plain ls -F -A output that's default

Environment

Versions installed:

  • Fish: 3.6.1
  • fzf.fish: 9.9
  • terminal: alacritty 0.12.2 (9d9982df)
  • OS: Linux, EndeavourOS, kernel 6.4.10-arch1-1
  • Configuration variables:
set fzf_directory_opts --bind "ctrl-o:execute($EDITOR {} &>/dev/tty)"
set fzf_preview_dir_cmd exa --all --color=always
fzf_configure_bindings --git_log=\e\cg

Additional context

Fix

This can easily fixed by adding set --export the the variables.
Is this intentionally? If so I would propose to add this to the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    not a bugThe issue is not a bug within fzf.fish

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions