Skip to content

XTGETTCAP replies are encoded in terminfo source format, instead of the compiled format #1699

@craigbarnes

Description

@craigbarnes

Sending the query DCS + q 6B6631 ST (XTGETTCAP for kf1) to various terminals seems to produce the following DCS response strings:

  • foot: DCS 1 + r 6B6631=1B4F50 ST
  • kitty: DCS 1 + r 6B6631=1b4f50 ST
  • xterm: DCS 1 + r 6B6631=1B4F50 ST
  • ghostty: DCS 1 + r 6B6631=5C454F50 ST

The value in the first 3 of these responses decodes to the compiled terminfo format (ESC O P), whereas the one produced by ghostty appears to be in terminfo source format (\ E O P).

I chose this example query in particular because it works in xterm, but I discovered the inconsistency while looking at logs for dte's XTGETTCAP response handling:

# ghosty
dbg: src/terminal/query.c:126: unhandled XTGETTCAP reply: 1+r74736C=5C455D323B

# foot ("TITLE" is detected via XTGETTCAP/terminfo "tsl" here)
info: src/terminal/input.c:184: detected terminal feature TITLE via query

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions