WezTerm — ANSI escape code support
WezTerm is a cross-platform, GPU-accelerated terminal emulator and multiplexer written in Rust by Wez Furlong since 2018. Unlike alacritty, WezTerm bundles a full TUI feature set in the binary: tabs, splits, workspaces, SSH multiplexing, and even a serial-port mode — all wired through a Lua config (`~/.wezterm.lua`) that returns a table and live-reloads on save.
For ANSI escape compatibility, WezTerm is one of the most feature-complete emulators shipping today: every xterm-ctlseqs SGR, full OSC 8 hyperlinks, full SGR 4:1–4:5 styled underlines, AND three image protocols simultaneously (DEC Sixel, the kitty graphics protocol, and iTerm2's OSC 1337 inline images) — so terminal apps that emit any of them just work.
Last updated
Feature support
How this terminal scores against the 15 features tracked in the site-wide support matrix. Click any feature name to see the full row across every terminal.
- 8 basic colors (30–37 / 40–47)SGR 30–37 foreground, 40–47 background.yes
- Bright (aixterm) colors (90–97 / 100–107)aixterm SGR extension.yes
- 256-color palette (38;5;n / 48;5;n)xterm 256-color extension.yes
- 24-bit truecolor (38;2;r;g;b)16.7M direct RGB. Set $COLORTERM=truecolor.yes
- Italic (SGR 3)Italic text attribute.yes
- Styled underlines (4:1–4:5)Curly/dotted/dashed underline styles.yes
- Strikethrough (SGR 9)Horizontal line through text.yes
- OSC 8 hyperlinksInline clickable URIs.yes
- Alt screen (?1049h)Full-screen app buffer.yes
- Mouse tracking (SGR ?1006)Mouse click/drag events.yes
- Bracketed paste (?2004)Pasted text wrapped in ESC[200~/ESC[201~.yes
- Focus events (?1004)ESC[I on focus in, ESC[O on focus out.yes
- Sixel graphicsDEC sixel inline raster images.yes
- Kitty graphics protocolPNG/RGB inline images, animations.partial
- Synchronized output (?2026)Atomic frame updates to avoid tearing.yes
Sequences that work here
Canonical reference pages for the escape sequences this terminal handles cleanly. Each links to a full page with byte forms, citations, and per-language examples.
- SGR 38;2;R;G;B — 24-bit truecolor foreground
\x1b[38;2;R;G;BmPick any of 16,777,216 foreground RGB colors directly.
- OSC 8 — Inline hyperlink
\x1b]8;;URI\x07TEXT\x1b]8;;\x07Render clickable hyperlinks in terminal output (gnome-terminal 3.26+, iTerm2, Windows Terminal, kitty, ...).
- DCS Sixel — Inline raster graphics (ESC P q … ESC \)
\x1bPq <sixel data> \x1b\\Embed pixel images in the terminal stream using the Sixel device-control payload.
- OSC 52 — System clipboard read/write
\x1b]52;c;BASE64\x07 (set clipboard 'c' to BASE64 decoded bytes)Set (or query) the host system clipboard via the terminal — works over SSH without X11 forwarding.
- DECSET ?2026 — Synchronized update mode
\x1b[?2026h (begin frame) \x1b[?2026l (end frame)Buffer screen updates until you signal end-of-frame — eliminates flicker on full repaints.
Quirks & version notes
Per-terminal caveats you'll want to know before relying on a sequence in production.
- Lua config returns a table — no GUI settings
- WezTerm config is a Lua module at `~/.wezterm.lua` (or `$XDG_CONFIG_HOME/wezterm/wezterm.lua`) that returns a config table. Live-reloads on save (no restart). Because it's real Lua, you can branch on hostname, OS, or env — `if os.getenv('FOO') then config.colors = ... end`. There's no settings dialog; if you want a GUI, the `wezterm.gui.gui_window()` API lets you write one yourself in Lua.
- Three image protocols supported simultaneously
- WezTerm renders DEC Sixel (DCS q ... ST), the kitty graphics protocol (APC G ... ST), AND iTerm2's OSC 1337 inline images. Apps that pick any of the three (chafa, kitten icat, imgcat, fzf+previewers) work without translation. The DA1 reply advertises sixel (`4`); kitty / iTerm2 protocols are detected via the kitty graphics query (`APC Gi=1;a=q\x1b\\`) or `$TERM_PROGRAM=WezTerm`.
- Built-in SSH multiplexer preserves OSC 8 + truecolor
- `wezterm ssh user@host` and `wezterm connect <name>` use WezTerm's own mux protocol (not classic ssh) — keystrokes and escape sequences round-trip end-to-end without the `$TERM=xterm-256color` downgrade that vanilla ssh forces on most remotes. OSC 8 hyperlinks, kitty graphics, and 24-bit color all survive across the link. Configure remotes under `ssh_domains` / `unix_domains` in `wezterm.lua`.
- Synchronized output (?2026) since version 20220624
- DECSET ?2026h / ?2026l atomic-frame mode shipped in WezTerm 20220624-141144-bd1b7c5d. Apps that use it (tmux 3.4+, neovim with `vim.opt.termsync = true`, ratatui / textual) avoid visible tearing during full-screen redraws. No config option — always on. Detection is via the DECRQM query `CSI ? 2026 $ p` which replies with the current mode.