Is it possible to multiplex a terminal window using Ruby with something like Pry or Readline/Coolline?

StackOverflow https://stackoverflow.com/questions/17355252

  •  01-06-2022
  •  | 
  •  

문제

Using Ruby, I'd like to produce a multiplexed terminal window whereby in one "sub" window I can dynamically update displayed data from the underlying application and in another "sub" window I can support user input for controlling the underlying application.

Is this possible with something like Pry or Readline/Coolline?

I can produce each window individually, I just don't know how to multiplex the terminal into two "sub" windows driven by the same application. I'd like to avoid having to use two separate terminal windows, which would require a multi-processed application.

도움이 되었습니까?

해결책

I think the right approach is to synthesize the single whole window, with the so-called "sub-windows" being logical abstractions that update the data for only their own designated region, so the actual display is, essentially, composited by the master view.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top