mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
allow any fzf option
This commit is contained in:
parent
84d519e973
commit
1d8eb59a03
1 changed files with 7 additions and 2 deletions
|
|
@ -32,8 +32,13 @@ end
|
||||||
function M.run_with(cwd, selected, job)
|
function M.run_with(cwd, selected, job)
|
||||||
local args = { "-m" }
|
local args = { "-m" }
|
||||||
|
|
||||||
if job.args.walker then
|
for cmd, option in pairs(job.args) do
|
||||||
table.insert(args, "--walker=" .. job.args.walker)
|
local c = cmd:gsub("_", "-")
|
||||||
|
if type(option) == "boolean" then
|
||||||
|
table.insert(args, "--" .. c)
|
||||||
|
else
|
||||||
|
table.insert(args, "--" .. c .. "=" .. option)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local child, err = Command("fzf")
|
local child, err = Command("fzf")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue