Appearance
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> STPs: numeric command (e.g.0set title,8hyperlink,133prompt mark)Pt: payload — free-form text, format depends onPsST: string terminator —ESC \(preferred) orBEL(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
- OSC 0 / 2 — Set Title
- OSC 4 — Palette Set / Query
- OSC 5 — Special Colors
- OSC 7 — Working Directory
- OSC 8 — Hyperlinks
- OSC 9 — Notification (iTerm)
- OSC 9;4 — Progress / Task State (ConEmu)
- OSC 10-19 — Dynamic Colors
- OSC 22 — Mouse Cursor Shape
- OSC 52 — Clipboard
- OSC 88 — Terminal Resume Protocol — Proposal
- OSC 99 — Kitty Notification Protocol
- OSC 104 / 105 / 110-119 — Color Reset
- OSC 133 — Shell Integration
- OSC 777 — Notification (urxvt)
- OSC 1337 — Inline Image
- See also CSI #P/Q/R — XTPUSHCOLORS
Other OSCs are listed in Sequence Reference → "OSC".
See also
- Shell Integration — uses OSC 7, OSC 133.
- Notifications — uses OSC 9, OSC 99, OSC 777.
- Cursor and Mouse — OSC 22 mouse cursor shape.
- Images — uses OSC 1337.