Module terminal

low level terminal library

Introduction#

The terminal library is a simple and lower level library for certain terminal interactions.

Functions#


restoreState#

terminal.restoreState()

Restores the last saved state of the terminal


saveState#

terminal.saveState()

Saves the current state of the terminal.


setRaw#

terminal.setRaw()

Puts the terminal into raw mode.


size#

terminal.size() -> table

Gets the dimensions of the terminal. NOTE: The size refers to the amount of columns and rows of text that can fit in the terminal.

Returns#

table The terminal size.

number width The terminal width, in columns.

number height The terminal height, in rows.