Skip to content

OSC Sequences

Operating System Command — ESC ] followed by a numeric command, semicolon-separated arguments, and a string terminator. Used for cross-cutting concerns like window title, hyperlinks, clipboard, and shell integration.

Structure

ESC ] <Ps> ; <Pt> ST
  • Ps: numeric command (e.g. 0 set title, 8 hyperlink, 133 prompt mark)
  • Pt: payload — free-form text, format depends on Ps
  • ST: string terminator — ESC \ (preferred) or BEL (legacy; both accepted)

For example:

  • OSC 0 ; My Window \e\\ — sets window title to "My Window"
  • OSC 8 ; ; https://example.com \e\\Visit\e]8;;\e\\ — wraps "Visit" in a hyperlink

Detail pages

Other OSCs are listed in Sequence Reference → "OSC".

See also

Otty