Linux终端仿真器具有单独的输入区域和输出区域?

Raj*_*ula 4 linux shell terminal ncurses

我正在寻找任何终端仿真器(如果有的话),它将有2个独立的区域用于输入命令和输出区域.

终端仿真器

 Output
    more output
    more output still...

    blah blahh
    blaahh blah
    words
=================================================
>input here
Run Code Online (Sandbox Code Playgroud)

我试图在谷歌搜索,但没有发现任何有用的东西,我也读过这个可以使用ncurses库实现的,但我不知道如何做到这一点.我也觉得,之前有人必须这样做,如果有人做过这种事,请与我分享你的解决方案,或者任何知道如何做到这一点的人,如果你能给我一些指示,我将不胜感激.实现这一点.

lew*_*urm 5

您可以通过打开它的两个实例来模拟任何终端的此类行为.在终端#2,通过以下方式获取当前的PTS:

$ tty
/dev/pts/10 # for example
Run Code Online (Sandbox Code Playgroud)

然后,在#1号航站楼上输入:

$ exec &> /dev/pts/10
$ echo you can see this message on terminal \#2
$ echo this is also true for standard error > /dev/stderr
Run Code Online (Sandbox Code Playgroud)