Skip to main content

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​

ValueMeaning
0Clear the tab stop at the current column (default)
3Clear 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 g or CSI 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​

SpecificationSection
ECMA-48—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✓0.1.0Implemented via clear_tabs method
Bobcat✓0.9.0Supported via TerminalCtrl library
contour✓v0.1.0
foot✓YesTBC (g) modes 0, 3 at csi.c:920-943
Ghostty✓v1.0.0
iTerm2✓YesVT100CSI_TBC token parsed with parameter handling for modes 0 and 3 via terminalSetTabStopAtCursor and terminalRemoveTabStops
Kitty✓YesTBC (CSI g) fully implemented in vt-parser.c:1250-1251
Konsole✓YesTBC (g) with parameters 0, 3 implemented at src/Vt102Emulation.cpp:2024-2025
mintty✓YesTBC (CSI g) at line 3365-3372, parameter 0 clears current tab, parameter 3 clears all tabs
mlterm✓rel-2_9_0Implemented at vt_parser.c:5802-5809
PuTTY✓0.45
Rio✓v0.0.3
rxvt-unicode✓1.2Supports modes 0, 3, 5
st✓0.3
terminology✓v0.1.0
VT100✓Yes
VTE✓YesFully implemented in vteseq.cc, supports modes 0, 2, 3, 5
WezTerm✓YesTBC implemented as Cursor::TabulationClear with TabulationClear enum supporting all modes
Windows Terminal✓YesImplemented 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.6TBC (CSI g) clears tab stops; parameters 0 and 3 supported
tuios✓v0.0.15
Zellij✓v0.10.0Supports TBC 0 (clear current tabstop) and TBC 3 (clear all tabstops)

See also​