Change Window Title (OSC 2)

Change the name of the window title.

  1. 0x1B
    ESC
  2. 0x5D
    ]
  3. 0x32
    2
  4. 0x3B
    ;
  5. ____
    t
  6. 0x1B
    ESC
  7. 0x5C
    \

Change the window title to t.

While xterm defaults to interpreting t as a ISO-8859-1-encoded string, which can be changed via Set Title Mode (XTSMTITLE) to either accept a hexadecimal-escaped or bare UTF-8 string, Ghostty always unconditionally expects t to be directly UTF-8-encoded.