^[control-codes live in libghostty-vt

Operating system commands

OSC 21337 Session Status

Set the status text and indicator iTerm2 shows in a tab.

OSC 21337 ; key=value ; … ST
ECMA-48
§8.3.89 OSC – Operating System Command, p. 51
Specification
Proprietary Escape Codes, iTerm2 documentation

OSC 21337 ; indicator=#rrggbb ; status=text ; status-color=#rrggbb ST sets what iTerm2 shows in the session’s tab: a colored dot, the indicator, and a line of text under the title, the status, in a color of its own. Any field can be left out, and one sent with an empty value clears it. Its definition is iTerm2’s Proprietary Escape Codes page, under Session Status; the iTerm2 page has its other commands.

A default xterm ignores it, as it is not among the OSC numbers it knows, and so does libghostty-vt.

Validation

OSC21337-1: Nothing on screen, and not a title

A
\e]21337;indicator=#ff0000;status=busy\a
B
|AB____|
cursor 1,3
title ""
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.