How do interactive console programs work?

I want to understand how programs like vimor manwork in a shell. How they allow the user to scroll, update the display, etc.

They seem to interact with some console library and therefore manipulate what we see. What is really going on?

+3
source share
2 answers

The terminal has a so-called terminal driver . This is not a driver in terms of hardware interface, but rather interprets certain sequences of characters that force it to perform operations such as scrolling, text attributes, etc.

terminfo. , curses ( , ncurses), terminfo .

terminfo , xterm, , , , .

+7

Source: https://habr.com/ru/post/1774859/


All Articles