I understand how to use stdin/stdout/stderr to interact with a user via the command line on a per-command basis (like git/maven/javac etc.)
However I would like to create a more Vim/Emacs-like interface. That is, when the program is run it clears the terminal, displays a full screen of characters, and deactivates echo. When finished the psuedo-window ‘closes’ and the terminal is returned to it’s previous state, as if nothing happened.
I’d to know how to produce this window-like behaviour with a command line interface. I’m currently programming java for unix, but ideally I’d like a more general explanation.
Thanks
This is exactly what the curses library (and its more popular implementation ncurses) is for. I recommend starting with this ncurses tutorial.