TBC
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!
Standard
TBC (Tabulation Clear) is a CSI sequence that clears one or more tab stops.
Syntax
CSI Ps g TBC — Tabulation Clear
Formal syntax
TBC = 0x1b, "[", [ Ps ], "g" ; Ps = "0" | "3" ; (* default: 0 *)
Parameters
| Value | Meaning |
|---|---|
0 | Clear the tab stop at the current column (default) |
3 | Clear all tab stops |
Description
Per ECMA-48 §8.3.154, TBC clears tabulation stops depending on the parameter value. The full standard defines values 0-5, but terminal emulators commonly support only two:
CSI 0 gorCSI g— Clears the tab stop at the current cursor column.CSI 3 g— Clears all character tab stops.
After clearing all tab stops, HT (0x09) will have no effect until new stops are set with HTS.
Examples
printf '\e[g' # Clear tab stop at current column
printf '\e[3g' # Clear all tab stops
Specifications
| Specification | Section |
|---|---|
| ECMA-48 | — |
Terminal support
| Terminal | Support | Version | Notes |
|---|---|---|---|
| Terminal Emulators | |||
| Alacritty | ✓ | 0.1.0 | Implemented via clear_tabs method |
| Bobcat | ✓ | 0.9.0 | Supported via TerminalCtrl library |
| contour | ✓ | v0.1.0 | |
| foot | ✓ | Yes | TBC (g) modes 0, 3 at csi.c:920-943 |
| Ghostty | ✓ | v1.0.0 | |
| iTerm2 | ✓ | Yes | VT100CSI_TBC token parsed with parameter handling for modes 0 and 3 via terminalSetTabStopAtCursor and terminalRemoveTabStops |
| Kitty | ✓ | Yes | TBC (CSI g) fully implemented in vt-parser.c:1250-1251 |
| Konsole | ✓ | Yes | TBC (g) with parameters 0, 3 implemented at src/Vt102Emulation.cpp:2024-2025 |
| mintty | ✓ | Yes | TBC (CSI g) at line 3365-3372, parameter 0 clears current tab, parameter 3 clears all tabs |
| mlterm | ✓ | rel-2_9_0 | Implemented at vt_parser.c:5802-5809 |
| PuTTY | ✓ | 0.45 | |
| Rio | ✓ | v0.0.3 | |
| rxvt-unicode | ✓ | 1.2 | Supports modes 0, 3, 5 |
| st | ✓ | 0.3 | |
| terminology | ✓ | v0.1.0 | |
| VT100 | ✓ | Yes | |
| VTE | ✓ | Yes | Fully implemented in vteseq.cc, supports modes 0, 2, 3, 5 |
| WezTerm | ✓ | Yes | TBC implemented as Cursor::TabulationClear with TabulationClear enum supporting all modes |
| Windows Terminal | ✓ | Yes | Implemented in ITermDispatch.hpp:87 as TabClear. Supports clearing current column (0) and all columns (3). |
| xterm | ✓ | xterm-406 | |
| xterm.js | ✓ | 2.3.0 | |
| Multiplexers | |||
| cy | ✓ | v0.1.0 | |
| GNU Screen | ✓ | v.4.2.0 | |
| tmux | ✓ | 1.6 | TBC (CSI g) clears tab stops; parameters 0 and 3 supported |
| tuios | ✓ | v0.0.15 | |
| Zellij | ✓ | v0.10.0 | Supports TBC 0 (clear current tabstop) and TBC 3 (clear all tabstops) |
See also
- HTS — Set Tab Stop — Set a tab stop at the current column
- HT — Horizontal Tab — Advance to the next tab stop
- CHT/CBT — Cursor Tab Forward/Backward — Move by multiple tab stops