wire / terminal-csi / cnl

CSI CNL / CPL — Cursor Next / Previous Line

CNL (final 'E') moves the cursor down Pn lines (default 1) AND to column 1; CPL (final 'F') moves up Pn lines and to column 1. They combine a vertical move with a carriage return, unlike CUU/CUD which preserve the column.

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

aka: CNL · CPL · cursor next line · cursor previous line · ESC [ E · ESC [ F

frame

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

terminator (none): ST · BEL

parameters / subcommands

idnamebytes (ST)meaning
cnl CNL — Cursor Next Line (E) \x1b[2E CSI Pn E moves the cursor down Pn lines and to the first column (default Pn = 1).
cpl CPL — Cursor Preceding Line (F) \x1b[2F CSI Pn F moves the cursor up Pn lines and to the first column (default Pn = 1).

gotchas


provenance

per-fact attribution:

see also

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