Module dkb.exec
Module to easily invoke os commands.
Powered by hs.task, launches async tasks and can wait for them synchronously inside a coroutine through applicationYield function.
Functions
async (cmd, args[, completion]) | Executes a cmd asyncrhonously |
sync (cmd, args[, completion]) | Executes a cmd syncrhonously |
Functions
Methods- async (cmd, args[, completion])
-
Executes a cmd asyncrhonously
Parameters:
- cmd string Command to execute (needs full path)
- args string Arguments in a string separated by a space
- completion func Executed after the task finishes (optional)
Returns:
-
hs.task
The task that was started with the provided cmd and args
- sync (cmd, args[, completion])
-
Executes a cmd syncrhonously
Parameters:
- cmd string Command to execute (needs full path)
- args string Arguments in a string separated by a space
- completion func Executed after the task finishes before returning (optional)
Returns: