wire / terminal-osc / 0

OSC 0 — Set icon name and window title

OSC 0 ; text ST sets BOTH the terminal window title and the icon name (legacy X11 icon-name concept) to text. Written ESC ] 0 ; text ST (ST = ESC \, BEL also accepted). The most widely supported of the title-setting OSCs.

terminal-osc kind control-sequence status de-facto verification verified tier B terminal-escape@1

aka: set window and icon title · set title · OSC 0 · ESC ] 0

frame

OSC introducer: \x1b] ESC ] (0x1B 0x5D)

terminator (ST|BEL): ST \x1b\ · BEL \x07

parameters / subcommands

idnamebytes (ST)meaning
set Set icon name and window title \x1b]0;mytitle\x1b\ OSC 0 ; Pt ST sets both the window title and the X11 icon name to the string Pt. On modern terminals the icon-name concept is vestigial, so OSC 0 effectively just sets the window/tab title.

gotchas


provenance

per-fact attribution:

see also

agent: curl -H 'accept: application/json' wire.phall.io/terminal-osc/0 or /terminal-osc/0.json