wire / terminal-csi / ich

CSI ICH / DCH — Insert / Delete Character

ICH (final '@') inserts Pn blank characters at the cursor, shifting the rest of the line right (characters pushed past the right margin are lost); DCH (final 'P') deletes Pn characters at the cursor, shifting the remainder of the line left with blanks appearing at the right margin. Both default Pn to 1 and act only on the current line.

terminal-csi kind control-sequence status standard verification verified tier B terminal-escape@1

aka: ICH · DCH · insert character · delete character · ESC [ @ · ESC [ P

frame

CSI introducer: \x1b[ ESC [ (0x1B 0x5B)

terminator (none): ST · BEL

parameters / subcommands

idnamebytes (ST)meaning
ich ICH — Insert Character (@) \x1b[3@ CSI Pn @ inserts Pn blanks at the cursor; characters to the right shift right by Pn and any pushed past the right margin are lost. The cursor does not move.
dch DCH — Delete Character (P) \x1b[3P CSI Pn P deletes Pn characters at the cursor; the remainder of the line shifts left and blanks (current background) appear at the right margin.

gotchas


provenance

per-fact attribution:

see also

agent: curl -H 'accept: application/json' wire.phall.io/terminal-csi/ich or /terminal-csi/ich.json