mitosch / textual-terminal

A terminal emulator widget for Textual.
GNU Lesser General Public License v3.0
87 stars 5 forks source link

An option for maintaining (or clearing) the terminal after command completion #8

Open juergenpabel opened 4 months ago

juergenpabel commented 4 months ago

I would like for the output to remain visible after the executed command completes (right now once it completes the terminal contents are immediately cleared). I have worked out a hacky solution by re-routing Terminal.stop() to my own implementation (while invoking the original implementation) and copying display/screen contents and such - but that's just a bad workaround. It would be nice to have an option to keep showing the terminal contents until "something" happened: "something" could be a key press in the widget, an invocation of a "releasing" method or a pop-up, ...

Since there are many ways to approach and variations to implement the basic functionality, I would like to discuss first what would be the favorable way for this. I might just implement it than and create a PR.

Some context: