module

Term::Terminfo

Constants

VERSION = "1.0.0"

Instance methods

attributes(io = STDOUT)

Get terminal attributes

Source
capabilities

Get all terminal capabilities

Source
clear_screen(io = STDOUT)

Clear the screen

Source
color(text : String, fg : Int32 | Nil = nil, bg : Int32 | Nil = nil) : String

Apply color

Source
color?

Check if terminal supports color

Source
color_256(text : String, fg : Int32 | Nil = nil, bg : Int32 | Nil = nil) : String

Apply 256 color

Source
color_rgb(text : String, fg : Tuple(Int32, Int32, Int32) | Nil = nil, bg : Tuple(Int32, Int32, Int32) | Nil = nil) : String

Apply RGB color

Source
database

Get database module

Source
height

Get terminal height

Source
hide_cursor(io = STDOUT)

Hide cursor

Source
keyboard

Get keyboard module

Source
modes

Get modes module

Source
move_cursor(row : Int32, col : Int32, io = STDOUT)

Move cursor to position

Source
restore_cursor(io = STDOUT)

Restore cursor position

Source
save_cursor(io = STDOUT)

Save cursor position

Source
sequences

Get escape sequences

Source
show_cursor(io = STDOUT)

Show cursor

Source
size

Get terminal size (width, height)

Source
style(text : String, *styles : Symbol) : String

Apply text style

Source
supports?(capability : Symbol)

Check if terminal supports a specific capability

Source
tty?(io = STDOUT)

Check if output is a terminal

Source
type

Get terminal type from environment

Source
width

Get terminal width

Source

Nested types