wire / terminal-osc / 2

OSC 2 — Set window title

OSC 2 ; text ST sets ONLY the terminal window (tab) title to text, leaving the icon name unchanged. Written ESC ] 2 ; text ST (ST = ESC \, BEL also accepted). Use this instead of OSC 0 when you want to set the window title without touching the X11 icon name.

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

aka: set window title · OSC 2 · ESC ] 2

frame

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

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

parameters / subcommands

idnamebytes (ST)meaning
set Set window title \x1b]2;mytitle\x1b\ OSC 2 ; Pt ST sets the window (tab) title to the string Pt, without changing the X11 icon name.

gotchas


provenance

per-fact attribution:

see also

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