Ciph3rzer0
Ciph3rzer0

Reputation: 577

How to make programs like nano/pico in linux

I was wondering how to make a program that can output to every line of the console and not just output a line to be tacked on to the bottom. How can I get control of the whole console like that so I could write console based apps?

Upvotes: 4

Views: 1910

Answers (1)

Paul Dixon
Paul Dixon

Reputation: 300975

You can use curses or similar library to make that kind of UI - check out GNU ncurses for example.

Wikipedia summarises ncurses nicely

ncurses is a programming library providing an API, allowing the programmer to write text user interfaces in a terminal-independent manner. It's a toolkit for developing "GUI-like" apps which run under a terminal emulator. It also optimizes screen changes, in order to reduce the latency experienced when using remote shells.

To get started, check out the NCURSES Programming HOWTO

Upvotes: 11

Related Questions