I'm writing a program that requires a line editor (like the one
Matlab or the shells "tcsh" and "bash" use). Currently I use
curses, but want to move away from it for several reasons.
Essentially curses tries to do too much for what I want.
Specifically, how does one program the following (without curses):
- move the cursor anywhere on current line
- clear the screen and move to the top
I know how put the terminal in raw or cbreak mode, but cursor
movement on different terminals eludes me. (Before I started
using curses, I actually used stuff like 'printf( "%c", 8 );'
to move backwards! This didn't work very well on different
I have looked, briefly, at readline: too much to digest. Do I
need to go to the bookstore and buy something on termcap or
terminfo? Is there a FAQ that might help? My main targets right
now are Linux PC's and HP workstations.
Any pointers would be greatly appreciated!