^[control-codes live in libghostty-vt

Operating system commands

OSC 51 Reserved for Emacs

A number xterm sets aside for the Emacs shell, and does nothing with itself.

OSC 51 ; Pt ST
ECMA-48
§8.3.89 OSC – Operating System Command, p. 51
xterm
Operating System Commands

xterm’s Control Sequences document lists OSC 51 as “reserved for Emacs shell”: a number set aside so that Emacs’s terminal modes can use it for their own messages without clashing with anything xterm does. Emacs’s vterm package, for one, sends commands to Emacs through it. xterm itself does nothing with it (do_osc), and neither does libghostty-vt, which passes.

Validation

OSC51-1: Ignored

A
\e]51;Efind-file "~/notes"\a
B
|AB____|
cursor 1,3
reply none
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.