class Unibilium::Terminfo
- Unibilium::Terminfo
- Reference
- Object
Overview
TODO doc
Defined in:
terminfo.crClass Method Summary
-
.dummy
Constructs a dummy terminfo database.
-
.from_bytes(bytes : Bytes)
Creates a terminfo database from the given bytes.
-
.from_env
Creates a terminfo database for the terminal name found in the environment.
-
.from_file(path)
Creates a terminfo database from the given file path.
-
.from_io(io)
Creates a terminfo database from the given io.
-
.from_terminal(name)
Creates a terminfo database for the given terminal name.
-
.with_dummy(&)
Constructs a dummy terminfo database and yield it to the block.
Instance Method Summary
-
#aliases
Gets the aliases.
-
#aliases=(aliases : Array(String))
Sets the aliases.
-
#destroy
Destroys the terminfo database.
-
#destroyed?
Returns
true
if the terminfo database has been destroyed. -
#dump
Returns the database as a compiled terminfo entry.
- #extensions : Unibilium::Extensions
- #get(id : Entry::Boolean)
- #get(id : Entry::Numeric)
- #get(id : Entry::String)
-
#get?(id : Entry::Boolean)
Gets the value of Boolean option id.
-
#get?(id : Entry::Numeric)
Gets the value of Numeric option id.
-
#get?(id : Entry::String)
Gets the value of String option id.
- #get?(name : String)
-
#name
Gets the terminal name.
-
#name=(name)
Sets the terminal name.
-
#name_for(id : Entry::Boolean)
Gets the full name for the Boolean option id.
-
#name_for(id : Entry::Numeric)
Gets the full name for the Numeric option id.
-
#name_for(id : Entry::String)
Gets the full name for the String option id.
- #run(format, *args)
-
#set(id, value)
Sets an option (Boolean, Numeric or String) identified by id to value.
-
#short_name_for(id : Entry::Boolean)
Gets the short name for the Boolean option id.
-
#short_name_for(id : Entry::Numeric)
Gets the short name for the Numeric option id.
-
#short_name_for(id : Entry::String)
Gets the short name for the String option id.
-
#to_unsafe : Pointer(Void)
Returns the underlying Unibilium database pointer.
Class Method Detail
Creates a terminfo database for the terminal name found in the environment.
Similar to Unibilium::Terminfo.from_terminal(ENV["TERM"])
.
Constructs a dummy terminfo database and yield it to the block. It ensures that the database is destroyed after the block.
Instance Method Detail
Destroys the terminfo database.
Subsequent calls to methods will segfault.
You can check if it has been destroyed with #destroyed?
.
Returns the database as a compiled terminfo entry.
It can be directly written to a file for later use.