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.
-
Ciao Daniele,
I was wondering if there is a way to make coexist
ncurses
andcli
.My idea is to build a console application (TUI) that prints some log in a separate panel (or "window", in
ncurses
wording) 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.(
ncurses
is one possible choice, and despite being written in C, C++ wrappers are available).You designed
cli
in a flexible enough way that anyone willing to use a ostream object other thanstd::cout
can do that, so that should not be an issue to wrap ncurses into a new ostream object and use that incli
I 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:
CliFileSession
instead (CliFileSession
does requires a istream object in the constructor) and I grab the stdin stream from curses and pass it to thecli
object, in you opinion, will that work ?Thanks for your answer.
Nicola.
PS: if anybody has a better idea on how to use
cli
for a TUI application with two panels, I'm all ears :-)Beta Was this translation helpful? Give feedback.
All reactions