Dashed 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
Dashed underline (SGR 4:5) is an extended underline style that renders a dashed line below the text.
Syntax
CSI 4:5 m SGR 4:5 — Dashed underline
CSI 24 m SGR 24 — Not underlined
Formal syntax
SGR-dashed-underline = 0x1b, "[", "4:5", "m" ; SGR-not-underline = 0x1b, "[", "24", "m" ;
Description
SGR 4:5 selects a dashed underline style using the sub-parameter syntax from the Kitty underline extension. The line below the text is rendered as a series of dashes rather than a continuous line.
Dashed underline is reset by SGR 24 or SGR 0.
The underline color can be set independently using SGR 58.
Examples
printf '\e[4:5mDashed underlined text\e[24m Normal text\n'
Specifications
| Specification | Section |
|---|---|
| Kitty Underlines Extension | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✓ | Yes | SGR 4:5 - DASHED_UNDERLINE flag defined in cell.rs:32 |
| Bobcat | ? | ? | Implemented in external TerminalCtrl library, not in Bobcat source code |
| contour | ✓ | v0.3.6.240 | SGR 4:5 implemented |
| foot | ✓ | Yes | SGR 4:5, enum UNDERLINE_DASHED in terminal.h:114, csi.c:102-119 |
| Ghostty | ✓ | v1.1.0 | |
| iTerm2 | ✓ | v20260216-nightly | |
| Kitty | ✓ | v0.24.2 | |
| Konsole | ✓ | Yes | RE_UNDERLINE_DASH (value 5) handled via SGR 4:5 in src/Vt102Emulation.cpp:596,2040 |
| mintty | ✓ | Yes | SGR 4:5 implemented at termout.c:2142-2144, mapped to ATTR_BROKENUND | ATTR_DOUBLYUND, rendered as PS_DASH |
| mlterm | ✗ | No | Only single and double underline styles are implemented |
| PuTTY | ✗ | No | Only basic underline (SGR 4) supported; no colon-based subparameters |
| Rio | ✓ | v0.0.3 | |
| rxvt-unicode | ✗ | No | |
| st | ✗ | No | Only basic underline (SGR 4) is supported |
| terminology | ✗ | No | Only basic underline (SGR 4) supported, no style variants |
| VT100 | ✗ | No | |
| VTE | ✓ | Yes | SGR 4:5 supported via subparameter handling in sgr.hh |
| WezTerm | ✓ | Yes | Implemented via SGR 4:5 - see wezterm-escape-parser/src/csi.rs:2667 |
| Windows Terminal | ✓ | Yes | SGR 4:5 - DashedUnderlined (value 5) in UnderlineStyle enum |
| xterm | ✗ | No | No evidence of SGR 4:5 support. Only basic underline (SGR 4) and double underline (SGR 21) are implemented |
| xterm.js | ✓ | 4.6.0 | |
| Multiplexers | |||
| cy | ✗ | No | Only basic underline (SGR 4) is supported |
| GNU Screen | ✗ | No | |
| tmux | ✓ | 2.9 | SGR 4:5 - Requires Smulx capability |
| tuios | ✓ | v0.2.0 | |
| Zellij | ✓ | v0.39.0 | |
See also
- Underline — SGR 4 — Single straight underline
- Curly underline — SGR 4:3 — Wavy underline style
- Dotted underline — SGR 4:4 — Dotted underline style