From 1d8eb59a03d45da7ba94b4bdff6937ece0a82469 Mon Sep 17 00:00:00 2001 From: Claus Beerta Date: Sun, 4 May 2025 18:51:03 +0200 Subject: [PATCH] allow any fzf option --- yazi-plugin/preset/plugins/fzf.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yazi-plugin/preset/plugins/fzf.lua b/yazi-plugin/preset/plugins/fzf.lua index f1dae418..55a6234d 100644 --- a/yazi-plugin/preset/plugins/fzf.lua +++ b/yazi-plugin/preset/plugins/fzf.lua @@ -32,8 +32,13 @@ end function M.run_with(cwd, selected, job) local args = { "-m" } - if job.args.walker then - table.insert(args, "--walker=" .. job.args.walker) + for cmd, option in pairs(job.args) do + local c = cmd:gsub("_", "-") + if type(option) == "boolean" then + table.insert(args, "--" .. c) + else + table.insert(args, "--" .. c .. "=" .. option) + end end local child, err = Command("fzf")