# Query Allowable Features (OSC 62)

> Ask xterm what all the parts of one of its guarded features are.

- **Sequence:** `OSC 62 ; Pt ST`
- **ECMA-48:** [§8.3.89 OSC – Operating System Command, p. 51](https://archive.org/details/ecma-48-5th-edition-june-1991/page/n64/mode/1up)
- **xterm:** [Operating System Commands](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html)

XTQALLOWABLE, `OSC 62 ; resource ST`, asks xterm for every part of one of
its guarded features, whether refused or not, so that a program can make
sense of what [OSC 61](https://control-codes.page/osc/disallowed/index.html.md) reports. `resource` is one of the
names [OSC 60](https://control-codes.page/osc/allowed/index.html.md) can report, and the answer is
`OSC 62 ; list ST`, the parts by name, separated by commas
([`unparse_allowable_ops`](https://github.com/ThomasDickey/xterm-snapshots/blob/xterm-411a/charproc.c#L10701-L10720)).
For `allowTcapOps`, the termcap queries, those are `SetTcap` and `GetTcap`,
[XTSETTCAP](https://control-codes.page/dcs/xtsettcap/index.html.md) and [XTGETTCAP](https://control-codes.page/dcs/xtgettcap/index.html.md). The case
follows a default xterm.

This is xterm's own, and libghostty-vt does not have it, so the case is a
known difference.

## Validation

### OSC62-1: All the termcap operations

*A known difference: libghostty-vt does not pass this case.*

Input, one step per line:

```text
\e]62;allowTcapOps\a
```

Expected screen:

```text
|______|
reply \e]62;SetTcap,GetTcap\a
```

---

This is the Markdown version of <https://control-codes.page/osc/allowable/>. On that page every validation case runs live in libghostty-vt, the terminal emulation core of Ghostty, compiled to WebAssembly.

The validation cases are written in the notation described in <https://control-codes.page/notation/index.html.md>.
