1

My question is maybe silly for some of you but after some digging on my own I'm currently struggling.

My need is to use Node built-in child_process to execute shell command. But the process I would like to execute contains some "line who blinks", some progress bar etc etc. Like a real world CLI do most of the time.

But when I catch the stdout of the spawned process, I have all the lines of course, encoded in a way a shell would understand it I guess.

But how I could display that stdout like a normal shell would do ?

I don't know if I'm clear enough, tell me if that's not the case.

Thanks ;)

Neewd
  • 93
  • 2
  • 13
  • Commands that update their text output in more complex ways are typically seen as interactive, thus need some kind of a terminal, which allows cursor adressing, overprinting etc. To grab output from those programs you need a terminal emulator running the program through a pty or a lib that hides this complexity from you (e.g. expect like lib). – jerch Jun 09 '20 at 00:50

0 Answers0