feat: update types to include new Yazi APIs

This commit is contained in:
sxyazi
2025-12-31 15:59:41 +08:00
parent da5b69563c
commit 398796d88f
5 changed files with 287 additions and 100 deletions

View File

@@ -3,7 +3,8 @@
local M = {}
function M:peek(job)
local child, err = Command("lsar"):arg(tostring(job.file.url)):stdout(Command.PIPED):spawn()
-- TODO: remove "or job.file.url"
local child, err = Command("lsar"):arg(tostring(job.file.path or job.file.url)):stdout(Command.PIPED):spawn()
if not child then
return ya.err("spawn `lsar` command failed: " .. err)
end