refactoring
This commit is contained in:
parent
74ae1150a3
commit
69400c1aa3
142 changed files with 11 additions and 70 deletions
20
modules/home/yazi/plugins/open-with-cmd.yazi/main.lua
Normal file
20
modules/home/yazi/plugins/open-with-cmd.yazi/main.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
entry = function(_, job)
|
||||
local block = job.args[1] and job.args[1] == "block"
|
||||
|
||||
local value, event = ya.input({
|
||||
title = block and "Open with (block):" or "Open with:",
|
||||
position = { "hovered", y = 1, w = 50 },
|
||||
})
|
||||
|
||||
if event == 1 then
|
||||
local s = ya.target_family() == "windows" and " %*" or ' "$@"'
|
||||
ya.manager_emit("shell", {
|
||||
value .. s,
|
||||
block = block,
|
||||
orphan = true,
|
||||
confirm = true,
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue