Can i get the input and output stream of the terminal in backend?

For example, when i type a command string in the terminal of frontend, can i get that command string in the backend and output whatever i want to the terminal in frontend?

@PeimingMo1 I believe the following comment still holds true regarding reading terminal text:

I don’t think it is possible. One has to use tasks or processes to get an output. Terminal are just character streams, there are not such high-level concepts like a command or a task.

Actually i want to use the terminal to only transform Commands and Results.

In the backend, i send the Commands to another device to start a process to execute them.

I read the source code in ‘TerminalProcess’. Can i extend ‘TerminalProcess’ and change the ‘this.terminal.on’ events, overwrite the function ‘write’ to achieve my needs?

@PeimingMo1 if you’re looking to customize/transform the output of processes outputted to the terminal then perhaps it would be a fine approach. Depending on the implementation it may mean that normal terminals (like today) are not supported any longer since the implementation has been changed to suit one specific use-case.

I have not tried myself to extend the TerminalProcess, so it should be something to test and try out for yourself so you can suit your use-case best.