Replies: 1 comment 1 reply
-
|
Hi Nicola, If I understand correctly, you want to have the input and output of the CLI on different "windows." In one window, you want to enter the commands, and in the other window, you want to see the output of the commands you entered in the first window. I'm not very familiar with ncurses, but if it provides a couple of An alternative approach could be to implement your own However, please keep in mind that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Ciao Daniele,
I was wondering if there is a way to make coexist
ncursesandcli.My idea is to build a console application (TUI) that prints some log in a separate panel (or "window", in
ncurseswording) from where the command are issued. The need is obvious: the side effect of a command might be verbose and it makes sense to print it elsewhere.(
ncursesis one possible choice, and despite being written in C, C++ wrappers are available).You designed
cliin a flexible enough way that anyone willing to use a ostream object other thanstd::coutcan do that, so that should not be an issue to wrap ncurses into a new ostream object and use that incliI am instead a little concerned about the stdin stream as, at least in
CliLocalTerminalSession, you manage the stdin (keyboard) natively, and that should NOT work withncurses(as far as I understandncurses....).Questions:
CliFileSessioninstead (CliFileSessiondoes requires a istream object in the constructor) and I grab the stdin stream from curses and pass it to thecliobject, in you opinion, will that work ?Thanks for your answer.
Nicola.
PS: if anybody has a better idea on how to use
clifor a TUI application with two panels, I'm all ears :-)Beta Was this translation helpful? Give feedback.
All reactions