allow any fzf option

This commit is contained in:
Claus Beerta 2025-05-04 18:51:03 +02:00
parent 84d519e973
commit 1d8eb59a03

View file

@ -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")