enum

TermBuf::Capability

Inherits Enum < Comparable < Value < Object

Stability: stable — changes only in a major release.

What the terminal on the other end can be asked to do.

Detection fills this in; the encoder only reads it. Anything not known to be supported is treated as unsupported, so a terminal nobody recognises gets plain text rather than a screen full of escape sequences.

This enum is append-only, and stays that way across major releases. A flags enum numbers its members by position, so inserting or reordering one silently renumbers every member after it, and a mask persisted or written down by bit value stops meaning what it meant. New capabilities go on the end, and a retired one keeps its place rather than being deleted.

Appending is therefore not a breaking change and can happen in a minor release; the names, the numbering, and the snake case spellings TERMBUF_CAPS accepts are what is frozen.

Constants

Color16 = 1_u64

The eight colours of SGR 30-37 and 40-47.

Color256 = 2_u64

The 256 colour palette, through SGR 38;5 and 48;5.

TrueColor = 4_u64

24 bit colour, through SGR 38;2 and 48;2.

BrightColors = 8_u64

The aixterm bright colour codes, SGR 90-97 and 100-107. Without this, palette indices 8 through 15 fall back to their dim counterparts, and a bright foreground picks up bold if bold is available.

Bold = 16_u64
Faint = 32_u64
Italic = 64_u64
Underline = 128_u64

SGR 4 and 24.

ExtendedUnderline = 256_u64

The 4:2 through 4:5 subparameter underline styles. Without this, every underline style degrades to a plain one.

UnderlineColor = 512_u64

SGR 58 and 59, colouring the underline separately from the text.

Blink = 1024_u64
RapidBlink = 2048_u64
Reverse = 4096_u64
Conceal = 8192_u64
Strike = 16384_u64
Overline = 32768_u64
Superscript = 65536_u64
ScrollRegion = 131072_u64

DECSTBM and the SU/SD scroll commands, which is what lets a scrolled region be moved rather than redrawn.

InsertDeleteLine = 262144_u64

IL and DL.

EraseChars = 524288_u64

ECH, erasing a run of cells without writing spaces over them.

SynchronizedOutput = 1048576_u64

DEC private mode 2026, wrapping a paint so the terminal never shows a half-drawn frame.

AltScreen = 2097152_u64

The alternate screen buffer, DEC private mode 1049.

BracketedPaste = 4194304_u64
FocusEvents = 8388608_u64
MouseSgr = 16777216_u64
KittyKeyboard = 33554432_u64
Osc8Links = 67108864_u64
KittyGraphics = 134217728_u64
KittyGraphicsTempFile = 268435456_u64
KittyColorStack = 536870912_u64
Titles = 1073741824_u64
CursorShape = 2147483648_u64
GraphemeClusters = 4294967296_u64

DEC private mode 2027, where the terminal measures text by grapheme cluster rather than by code point.

Measured only, never enabled. Turning the mode on changes how the terminal counts clusters, and the width probe measured this terminal with it off; enabling it afterwards would invalidate every width already established. Knowing whether the terminal has it is still worth having.

Detected but not in any preset: Prober asks for it with DECRQM and TERMBUF_CAPS=+grapheme_clusters sets it by hand, but no member of Capabilities below carries it, because which terminals answer yes has not been measured across enough of them to write down. A mask built from Capabilities::MODERN rather than from detection will not have it.

Osc52Clipboard = 8589934592_u64

OSC 52, reading and writing the system clipboard through the terminal.

Detected but not in any preset, for the same reason as GraphemeClusters and a different mechanism: OSC 52 answers nothing on a write, so there is no query to ask and detection is EnvironmentDetector's table of terminals that document it. That table is what will grow; Capabilities::MODERN stays out of it, since a terminal being modern says nothing about whether it will touch the clipboard.

None = 0_u64
All = 17179869183_u64

Instance methods

alt_screen?

Returns true if this enum value contains AltScreen

Source
bold?

Returns true if this enum value contains Bold

Source
bracketed_paste?

Returns true if this enum value contains BracketedPaste

Source
bright_colors?

Returns true if this enum value contains BrightColors

Source
color16?

Returns true if this enum value contains Color16

Source
color256?

Returns true if this enum value contains Color256

Source
conceal?

Returns true if this enum value contains Conceal

Source
cursor_shape?

Returns true if this enum value contains CursorShape

Source
erase_chars?

Returns true if this enum value contains EraseChars

Source
extended_underline?

Returns true if this enum value contains ExtendedUnderline

Source
faint?

Returns true if this enum value contains Faint

Source
focus_events?

Returns true if this enum value contains FocusEvents

Source
grapheme_clusters?

Returns true if this enum value contains GraphemeClusters

Source
insert_delete_line?

Returns true if this enum value contains InsertDeleteLine

Source
italic?

Returns true if this enum value contains Italic

Source
kitty_color_stack?

Returns true if this enum value contains KittyColorStack

Source
kitty_graphics?

Returns true if this enum value contains KittyGraphics

Source
kitty_graphics_temp_file?

Returns true if this enum value contains KittyGraphicsTempFile

Source
kitty_keyboard?

Returns true if this enum value contains KittyKeyboard

Source
mouse_sgr?

Returns true if this enum value contains MouseSgr

Source
none?
Source
osc52_clipboard?

Returns true if this enum value contains Osc52Clipboard

Source
overline?

Returns true if this enum value contains Overline

Source
reverse?

Returns true if this enum value contains Reverse

Source
scroll_region?

Returns true if this enum value contains ScrollRegion

Source
strike?

Returns true if this enum value contains Strike

Source
superscript?

Returns true if this enum value contains Superscript

Source
synchronized_output?

Returns true if this enum value contains SynchronizedOutput

Source
titles?

Returns true if this enum value contains Titles

Source
true_color?

Returns true if this enum value contains TrueColor

Source
underline?

Returns true if this enum value contains Underline

Source
underline_color?

Returns true if this enum value contains UnderlineColor

Source