Commands: Screen Functions

Legend: Italic letters such as _n_ are ASCII numbers that serve as arguments, separated with a semicolon. If an argument is left out, it's treated as 0 or 1, depending on what makes sense for the command.

CodeMeaning
`\e[mJ` Clear part of screen. _m_: 0 - from cursor, 1 - to cursor, 2 - all
`\e[mK` Erase part of line. _m_: 0 - from cursor, 1 - to cursor, 2 - all
`\e[nX` Erase _n_ characters in line.
`\e[nb` Repeat last printed characters _n_ times (moving cursor and using the current style).
\e[nL \\ \e[nM Insert (`L`) or delete (`M`) _n_ lines. Following lines are pulled up or pushed down.
\e[n@ \\ \e[nP Insert (`@`) or delete (`P`) _n_ characters. The rest of the line is pulled left or pushed right. Characters going past the end of line are lost.