class Tput::Features

Overview

Terminal features auto-detection.

Involved in a terminal are the terminal emulator in use (Tput::Emulator) and the term type initialized/running in it (ENV["TERM"] usually).

After those two variables are known, the features autodetection is ran to figure out the final details of terminal's behavior.

Included Modules

Defined in:

tput/features.cr

Constant Summary

Log = ::Log.for((self.name.gsub("::", '.')).underscore)

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(tput : Tput) #

[View source]

Instance Method Detail

def acsc : ACSHash #

[View source]
def acscr : ACSHash #

[View source]
def broken_acs? : Bool #

Does the terminal have broken ACS chars?


[View source]
def color? : Bool #

Color support flag (a yes/no)


[View source]
def detect_broken_acs #

Detects whether terminal has broken ACS characters


[View source]
def detect_magic_cookie #

[View source]
def detect_number_of_colors #

Detects number of colors supported by the terminal (2 - 16M)


[View source]
def detect_padding #

[View source]
def detect_pc_rom_charset #

Detects whether terminal supports PC ROM charset


[View source]
def detect_setbuf #

[View source]
def detect_unicode #

Detects Unicode support


[View source]
def get_console_cp #

Gets console codepage (Windows-specific)


[View source]
def inspect(io) #

[View source]
def magic_cookie? : Bool #

[View source]
def number_of_colors : Int32 #

Number of colors supported by the terminal


[View source]
def padding? : Bool #

[View source]
def parse_acs #

Parses terminal's ACS characters and returns ASCII->ACS and ACS->ASCII mappings.


[View source]
def pc_rom_charset? : Bool #

Does the terminal support PC ROM charset?


[View source]
def setbuf? : Bool #

[View source]
def unicode? : Bool #

Is unicode supported?


[View source]