command: add a subprocess command
This supports named arguments. It benefits from the infrastructure of async commands. The plan is to reimplement Lua's utils.subprocess() on top of it.
This commit is contained in:
1 parent
1aae88b487
commit
d9bc97bda6
5 files changed
+108
No files matched your search
@@ -50,4 +50,9 @@ mp.observe_property("vo-configured", "bool", function(_, v)
|
||||
function(res, val, err)
|
||||
print("done err scr.: " .. join(" ", {res, val, err}))
|
||||
end)
|
||||
|
||||
mp.command_native_async({name = "subprocess", args = {"sh", "-c", "echo hi && sleep 10s"}, capture_stdout = true},
|
||||
function(res, val, err)
|
||||
print("done subprocess: " .. join(" ", {res, val, err}))
|
||||
end)
|
||||
end)
|
||||
Reference in new issue
Block a user