feat: add smart-enter.yazi plugin

This commit is contained in:
sxyazi
2024-11-23 20:20:14 +08:00
parent 776b160c3f
commit 7733d17ba9
3 changed files with 71 additions and 0 deletions

10
smart-enter.yazi/init.lua Normal file
View File

@@ -0,0 +1,10 @@
--- @sync entry
local function setup(self, opts) self.open_multi = opts.open_multi end
local function entry(self)
local h = cx.active.current.hovered
ya.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = not self.open_multi })
end
return { entry = entry, setup = setup }