OSC l Set Window Title (dtterm)
Set the window title, as Sun's terminals and dtterm did.
OSC l Pt ST
OSC l Pt ST sets the window title to Pt, as OSC 2 does.
Sun’s terminals and CDE’s dtterm set the title and the icon with a letter instead of a number, and xterm accepts their forms too: its Control Sequences document lists them in its table of the Sun and dtterm window operations. There is no ;: everything after the letter is the text, a ; included (do_osc).
It is also the form xterm answers in when it reports the title, CSI 21 t (see XTWINOPS), though a default xterm refuses that report. Unlike OSC 2, an empty OSC l ST sets an empty title: the xterm put in place of an empty one is only for the numbered forms.
libghostty-vt has only the numbered forms and ignores the letters, so the cases that set the title are known differences.
Support
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | No | OSC is not among the controls it recognizes (§4.2) |
| VT510 | manual, 1st ed., 1993 | No | ignores an OSC string (chapter 4) |
| xterm | patch 412, xterm-411a | Yes | |
| libghostty-vt | 0f171f6 | No | OSC-l-1, OSC-l-2: only the numbered forms |
| Konsole | 26.11.70, a24c3d71 | No | |
| kitty | 0.49.1, run in a VM | No | fails the 2 cases that show it working |
| foot | 1.28.0, run in a VM | No | fails the 2 cases that show it working |
| pyte | 0.8.2, run as a library | No | fails the 2 cases that show it working |
| xterm.js headless | 6.0.0, run as a library | No | fails the 2 cases that show it working |
| alacritty_terminal | 0.26.0, run as a library | No | fails the 2 cases that show it working |
| ConEmu | build 230724, its documentation | No | not in ConEmu’s list, though it reports the title in this form for CSI 21 t, ANSI escape codes |
| rxvt-unicode | 9.31, run in a VM | No | fails the 2 cases that show it working |
| VTE | 0.84.1, run as a library | No | fails the 2 cases that show it working |
Validation
OSC-l-1: The dtterm form
\e]lHello\e\\
|___|
title "Hello"
OSC-l-2: Everything after the l is the title
\e]l;two;parts\a
|___|
title ";two;parts"