wire / terminal-csi / el
EL (final 'K') erases part or all of the current line: Ps = 0 (or omitted) from the cursor to end of line, 1 from start of line to cursor, 2 the entire line. The cursor does not move and erased cells take the current background color.
aka: EL · erase line · clear line · CSI K · ESC [ K · ESC [ 2 K
CSI introducer: \x1b[ ESC [ (0x1B 0x5B)
terminator (none): ST · BEL
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| 0 | EL 0 — cursor to end of line | \x1b[0K | CSI 0 K (or CSI K) erases from the cursor (inclusive) to the end of the line. |
| 1 | EL 1 — start of line to cursor | \x1b[1K | CSI 1 K erases from the start of the line to the cursor (inclusive). |
| 2 | EL 2 — entire line | \x1b[2K | CSI 2 K erases the whole current line. The cursor column does not change. |
per-fact attribution:
agent: curl -H 'accept: application/json' wire.phall.io/terminal-csi/el
or /terminal-csi/el.json