Terminal
Terminal methods allow you to run programs and render terminal content directly on a DirectGPU display.
These methods return a MethodResult, which is the result of the program or render operation.
Methods
Section titled “Methods”| Method |
|---|
run(displayId : DisplayID, program : string, ...) : MethodResult |
termRender(displayId : DisplayID, lines : table, ...) : MethodResult |
Runs a program on the display.
Requires: DisplayID, program : string
Optional: additional arguments passed to the program.
Returns: MethodResult
Example
Section titled “Example”gpu.run(displayId, "clear")gpu.run(displayId, "multishell")termRender
Section titled “termRender”Renders terminal content (a table of lines) on the display.
Requires: DisplayID, lines : table
Optional: additional arguments.
Returns: MethodResult
Example
Section titled “Example”local lines = { "Hello, world!", "This is my terminal."}
gpu.termRender(displayId, lines)