feat(ui): added multiple options for diff command

This commit is contained in:
Folke Lemaitre 2022-12-24 11:27:29 +01:00
parent 8ad05feef1
commit 7d02da2ff0
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
6 changed files with 83 additions and 5 deletions

View file

@ -109,7 +109,7 @@ function M.spawn(cmd, opts)
end
---@param cmd string[]
---@param opts? {cwd:string}
---@param opts? {cwd:string, env:table}
function M.exec(cmd, opts)
opts = opts or {}
---@type string[]
@ -117,6 +117,7 @@ function M.exec(cmd, opts)
local job = vim.fn.jobstart(cmd, {
cwd = opts.cwd,
pty = false,
env = opts.env,
stdout_buffered = true,
on_stdout = function(_, _lines)
lines = _lines