.dotfiles/.config/yazi/plugins/smart-switch.yazi/main.lua
2025-05-08 20:48:25 -04:00

13 lines
304 B
Lua

--- @sync entry
local function entry(_, job)
local cur = cx.active.current
for _ = #cx.tabs, job.args[1] do
ya.mgr_emit("tab_create", { cur.cwd })
if cur.hovered then
ya.mgr_emit("reveal", { cur.hovered.url })
end
end
ya.mgr_emit("tab_switch", { job.args[1] })
end
return { entry = entry }