Skip to main content

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-parameterStyle
4:0No underline
4:1Single straight underline (same as SGR 4)
4:2Double underline (same as SGR 21)
4:3Curly/wavy underline
4:4Dotted underline
4:5Dashed 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​

SpecificationSection
Kitty Underlines Extension—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓YesUndercurl supported via SGR 4:3
Bobcat??Implemented in external TerminalCtrl library, not in Bobcat source code
contour✓v0.1.0Supports SGR 4:3 subparameter syntax
foot✓YesImplemented at csi.c:112 via SGR 4:3, part of extended underline styles
Ghostty✓v1.0.0Supports curly, dotted, and dashed underline styles via SGR 4:3, 4:4, 4:5
iTerm2✓YesCurly/wavy underline (SGR 4:3) fully supported via VT100UnderlineStyleCurly with sub-parameter syntax in VT100GraphicRendition.
Kitty✓YesSupports SGR 4:3 via sub-parameter groups
Konsole✓YesSGR 4:3 sets RE_UNDERLINE_CURL via subparameter handling
mintty✓YesImplemented at src/termout.c:2136-2138. Uses SGR 4:3 subparameter to set ATTR_CURLYUND flag.
mlterm✗NoOnly single and double underlines supported, no curly/wavy variant
PuTTY✗NoExtended underline styles (SGR 4:3) not implemented
Rio✓v0.0.3
rxvt-unicode✗No
st✗NoSGR 4:3 not supported; colon separators parsed but no sub-parameters
terminology✗NoNo support for SGR 4:3 colon syntax for underline styles
VT100✗No
VTE✓YesSupports underline styles 0-5: none, single, double, curly, dotted, dashed via SGR 4:n subparameters
WezTerm✓20210203-095643-70a364eb
Windows Terminal✓YesSGR 4:3 sets curly underline style via sub-parameters
xterm✗NoNot implemented in xterm
xterm.js✓4.10.0Via SGR 4:3 subparameter
Multiplexers
cy✗No
GNU Screen✗NoSGR 4:3 colon syntax not implemented
tmux✓2.9SGR 4:3 supported via colon-separated parameters
tuios✓v0.5.0
Zellij✓v0.39.0Implemented as part of styled underlines feature (SGR 4:3)

See also​