How to make programs like nano / pico in linux

I was wondering how to create a program that can output to each line of the console, rather than just output a line that needs to be anchored to the bottom. How can I take control of the entire console so that I can write console applications?

+2


source to share


1 answer


You can use curses or a similar library to create such a user interface - check out GNU ncurses for example.

Wikipedia summarizes ncurses nicely



ncurses is a programming library providing an API that allows the programmer to enter textual user interfaces in a terminal independent manner. It is a development toolkit for GUI applications that run under a terminal emulator. It also optimizes screen changes to reduce latency when using a remote shell.

Check out the NCURSES HOWTO Programming first.

+9


source







All Articles