Curly underline
AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Experimental
Curly underline (SGR 4:3) is an extended underline style that renders a wavy or curly line below the text.
Syntax
CSI 4:3 m SGR 4:3 — Curly/wavy underline
CSI 24 m SGR 24 — Not underlined
Formal syntax
SGR-curly-underline = 0x1b, "[", "4:3", "m" ; SGR-not-underline = 0x1b, "[", "24", "m" ;
Description
SGR 4:3 selects a curly (wavy) underline style using the sub-parameter syntax from ITU-T T.416. This extends the basic underline (SGR 4) with additional style variants.
The sub-parameter values for SGR 4 are:
| Sub-parameter | Style |
|---|---|
4:0 | No underline |
4:1 | Single straight underline (same as SGR 4) |
4:2 | Double underline (same as SGR 21) |
4:3 | Curly/wavy underline |
4:4 | Dotted underline |
4:5 | Dashed underline |
Curly underlines are reset by SGR 24 or SGR 0.
Curly underlines are commonly used by terminal applications to indicate spelling errors, diagnostics, or other inline annotations — similar to the "squiggly underline" in code editors. The underline color can be set independently using SGR 58.
Examples
printf '\e[4:3mCurly underlined text\e[24m Normal text\n'
printf '\e[4:3;58;5;9mRed curly underline\e[0m\n'
Specifications
| Specification | Section |
|---|---|
| Kitty Underlines Extension | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✓ | Yes | Undercurl supported via SGR 4:3 |
| Bobcat | ? | ? | Implemented in external TerminalCtrl library, not in Bobcat source code |
| contour | ✓ | v0.1.0 | Supports SGR 4:3 subparameter syntax |
| foot | ✓ | Yes | Implemented at csi.c:112 via SGR 4:3, part of extended underline styles |
| Ghostty | ✓ | v1.0.0 | Supports curly, dotted, and dashed underline styles via SGR 4:3, 4:4, 4:5 |
| iTerm2 | ✓ | Yes | Curly/wavy underline (SGR 4:3) fully supported via VT100UnderlineStyleCurly with sub-parameter syntax in VT100GraphicRendition. |
| Kitty | ✓ | Yes | Supports SGR 4:3 via sub-parameter groups |
| Konsole | ✓ | Yes | SGR 4:3 sets RE_UNDERLINE_CURL via subparameter handling |
| mintty | ✓ | Yes | Implemented at src/termout.c:2136-2138. Uses SGR 4:3 subparameter to set ATTR_CURLYUND flag. |
| mlterm | ✗ | No | Only single and double underlines supported, no curly/wavy variant |
| PuTTY | ✗ | No | Extended underline styles (SGR 4:3) not implemented |
| Rio | ✓ | v0.0.3 | |
| rxvt-unicode | ✗ | No | |
| st | ✗ | No | SGR 4:3 not supported; colon separators parsed but no sub-parameters |
| terminology | ✗ | No | No support for SGR 4:3 colon syntax for underline styles |
| VT100 | ✗ | No | |
| VTE | ✓ | Yes | Supports underline styles 0-5: none, single, double, curly, dotted, dashed via SGR 4:n subparameters |
| WezTerm | ✓ | 20210203-095643-70a364eb | |
| Windows Terminal | ✓ | Yes | SGR 4:3 sets curly underline style via sub-parameters |
| xterm | ✗ | No | Not implemented in xterm |
| xterm.js | ✓ | 4.10.0 | Via SGR 4:3 subparameter |
| Multiplexers | |||
| cy | ✗ | No | |
| GNU Screen | ✗ | No | SGR 4:3 colon syntax not implemented |
| tmux | ✓ | 2.9 | SGR 4:3 supported via colon-separated parameters |
| tuios | ✓ | v0.5.0 | |
| Zellij | ✓ | v0.39.0 | Implemented as part of styled underlines feature (SGR 4:3) |
See also
- Underline — SGR 4 — Single straight underline
- Dotted underline — SGR 4:4 — Dotted underline style
- Dashed underline — SGR 4:5 — Dashed underline style
- Underline color (indexed) — Set underline color