feat: more Yazi v25.5.28 goodies
This commit is contained in:
@@ -5,7 +5,7 @@ Pipe any shell command as a previewer.
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
ya pack -a yazi-rs/plugins:piper
|
||||
ya pkg add yazi-rs/plugins:piper
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
|
||||
local M = {}
|
||||
|
||||
local function fail(job, s)
|
||||
ya.preview_widgets(job, {
|
||||
ui.Text.parse(s):area(job.area):wrap(ui.Text.WRAP),
|
||||
})
|
||||
end
|
||||
local function fail(job, s) ya.preview_widget(job, ui.Text.parse(s):area(job.area):wrap(ui.Wrap.YES)) end
|
||||
|
||||
function M:peek(job)
|
||||
local child, err = Command("sh")
|
||||
@@ -43,7 +39,7 @@ function M:peek(job)
|
||||
elseif job.skip > 0 and i < job.skip + limit then
|
||||
ya.emit("peek", { math.max(0, i - limit), only_if = job.file.url, upper_bound = true })
|
||||
else
|
||||
ya.preview_widgets(job, { M.format(job, outs) })
|
||||
ya.preview_widget(job, M.format(job, outs))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user