^[control-codes
live in libghostty-vt

Operating system commands

OSC 51 Reserved for Emacs

View as Markdown

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.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984NoOSC is not among the controls it recognizes (§4.2)
VT510manual, 1st ed., 1993Noignores an OSC string (chapter 4)
xtermpatch 412, xterm-411aNoreserved for the Emacs shell, and ignored
libghostty-vt0f171f6Noignored
Konsole26.11.70, a24c3d71No
ConEmubuild 230724, its documentationNonot in ConEmu’s list, ANSI escape codes

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.