Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Terminal

tyfkda edited this page Jul 9, 2018 · 11 revisions

Escape sequence

ESC = 0x1b

  • Clear screen: ESC[2J
  • Move cursor to the top left: ESC[H
  • Get cursor position: ESC[6n => ESC[<col>;<row>R
    • You can try: echo -en '\033[6n'
  • Get terminal window size: move cursor to far position (e.g. ESC[999CESC[999B), then get cursor position

.

Clone this wiki locally