microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.42k stars 233 forks source link

Capturing Terminal Output #603

Closed Dj-1112 closed 11 months ago

Dj-1112 commented 1 year ago

Environment details

Issue description

Hi, We have integrated a web-terminal into our web application, we are using node-pty in the back end and x-term on the front end. The terminal is working as expected, but we need to capture the output that is coming from the terminal. We are using web-sockets to send data back and forth, the problem is that everything i type is being sent back and forth and since the shell is also echoing the commands that is also being sent back and forth. How do we just capture the output of any command that got executed? so that we can parse it and display a success message else where in the page.