Skip to content

terminfo()

terminfo(<player|descriptor>)

Returns a list with at least one element: the type of client used by the player, or “unknown” if the client being used doesn’t support being asked to identify itself using RFC 1091.

The other elements describe what the client can do. These are about its protocols and connection; the rest are in terminfo display.

ElementPresent when
pueblothe client is in Pueblo mode
mxpthe client is in MXP mode
screenreadera screen reader reads this connection: MTTS says so, or the player turned on Screen reader mode in the web portal’s Terminal settings, on Play
telnetthe client understands the telnet protocol
gmcpGMCP was agreed over telnet; see oob()
sslthe client is using an SSL/TLS connection
websocketthe client is connected through a WebSocket
portalthe connection is the web portal’s background session

These elements describe what the client can draw:

ElementPresent when
prompt_newlinessee PROMPT_NEWLINES
stripaccentsthe client is sent 7-bit ASCII, with no accented characters
hyperlinksweb links are sent as clickable OSC 8 links; see HYPERLINKS
commandlinkscommand links are sent as clickable MSLP links; see HYPERLINKS
one of kitty, iterm2, sixel or blockspictures are drawn that way; see GRAPHICS
animationmoving pictures play; see ANIMATION

One of the color styles shown in COLORSTYLE will also be included.

You must have see_all, or use terminfo() on yourself, to see all information or use a <descriptor>. Mortals using terminfo() on another player will always receive “unknown” for the client name, and will not get telnet/gmcp/ssl/prompt_newlines in the output list.

Anyone may see pueblo, mxp, screenreader, stripaccents and the color style. Softcode can use screenreader to leave out what only draws, such as a logo made of characters. A screen reader on telnet is sent no color, links or pictures, so its color style is plain; the web portal draws them itself, so it keeps its own.

In the web portal with Screen reader mode on:

> think terminfo(me)
SHARPMUSH-PORTAL screenreader websocket commandlinks truecolor

::: seealso