fzf-plus is a small extension of Yazi’s built-in fzf plugin. It exposes an
extra option that lets you override FZF_DEFAULT_COMMAND per keymap entry, so
you can restrict the candidate list (e.g. limit depth with fd) without changing
global shell config.
This plugin exists as a standalone stop‑gap while a PR is under review upstream. If the PR is accepted, you can switch back to the embedded plugin.
- Same behavior as the built-in
fzfplugin for selection and navigation - Optional
--fzf-commandto setFZF_DEFAULT_COMMANDfor this run only - No custom argument parsing beyond Yazi’s normal plugin args
- Create a plugin directory, e.g.:
~/.config/yazi/plugins/fzf-plus/
- Put
main.luafrom this repository in that directory:
~/.config/yazi/plugins/fzf-plus/main.lua
- (Optional) Ensure you have
fzfandfdinstalled and on PATH.
Add a keymap entry that sets FZF_DEFAULT_COMMAND for this one invocation:
[[mgr.prepend_keymap]]
on = "z"
run = "plugin fzf-plus -- --fzf-command='fd -d=1'"
desc = "Jump to a file/directory via fzf"
This makes fzf use the provided command to generate its candidate list.
If you already set FZF_DEFAULT_COMMAND globally in your shell, the value from
--fzf-command takes precedence for this plugin invocation, allowing fine-grained
control inside Yazi without changing global config.
For example:
fd -d=1to limit search depthfd -t=d -d=2to list only directories to depth 2
If --fzf-command is omitted, fzf behaves as normal (reads from stdin or
uses its default command).
--fzf-commandmust be a string (as parsed by Yazi). It is passed verbatim toFZF_DEFAULT_COMMAND.- When you have a selection in Yazi, the selection is piped into
fzfand the default command is ignored (this matches the built-in plugin behavior).
This plugin is a minimal extension of Yazi’s built-in fzf plugin. It exists so
users can benefit from FZF_DEFAULT_COMMAND overrides immediately, even if the
upstream PR takes time to review or is ultimately rejected.
This project is licensed under the MIT License. See the LICENSE file for details.