Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
juergenpabel opened this issue May 14, 2024 · 0 comments

Comments

@juergenpabel
Copy link

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:

  • OS: Debian 12
  • Python: textual-terminal 0.3.0, pyte 0.8.2 and textual 0.59.0 (all straight from pip)
  • Application: I am using textual-terminal (primarily) as an log/output window for commands "triggered" elsewhere in my application. The terminal widget occupies only a portion of the screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant