Small library for executing commands faster
To import the v3 part of the library, use import command, capture, interact from require "lrunkit.v3"
When you first apply it with a string, it will create a command holder, to which you can pass arguments, when you pass arguments (or not), it runs it and returns a signal.
Exactly the same as command, but instead returns stdout in the end.
Returns a handle as if it were io.popen.
\open (mode:string)\read (format:string)\write (any:string)\close ()
Creates a runnable command using os.execute. Run it using runnable! (Lua: runnable())
error_on_fail: Will exit at errorerror_on_signal: Will exit if terminatedsilent_: Runs the command silently
Same as execute, but runs instantly.
Creates a streamable command using io.popen.
- Open with
streamable\open "r/w" - Read with
streamable\read fmt - Write with
streamable\write str - Close with
streamable\close!
Returns a chain of runnable commands. Use it as ch = chain runnable1, runnable2, runnable3 and run it with ch!