mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
feat(util.spawn): Proc:json()
This commit is contained in:
parent
b5441575e0
commit
5589c9d355
1 changed files with 4 additions and 0 deletions
|
|
@ -148,6 +148,10 @@ function Proc:run()
|
|||
end
|
||||
end
|
||||
|
||||
function Proc:json()
|
||||
return vim.json.decode(self:out())
|
||||
end
|
||||
|
||||
function Proc:out()
|
||||
return table.concat(self.data[self.stdout] or {})
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue