Closed blaggacao closed 2 years ago
/ cc @meowgorithm & @toby
I had been looking for a way to keep tea
from redrawing until esc
is hit after running https://github.com/charmbracelet/bubbletea/blob/master/examples/exec/main.go
That exec
otherwise works beautifully. But if an output of on of our actions here is just printing something to stdout
, then we must at least give the user time to appreciate that output.
Maybe you can help?
@blaggacao Ah, are you saying that Bubble Tea is still responding to messages (and hence forcing a render) while your exec is still running? If that's the case then you have found a bug (which I'm keen to patch). Let me know.
@meowgorithm No. I have a potential different use case:
That way, we can run a command, show it's output, let the user copy paste some logs somewhere, and when done, return to the TUI.
Thanks for chiming in!
That's a totally reasonable request (and a good feature). In terms of actual implementation, how about if we do it like this?
@meowgorithm sounds perfect! And sorry for speccing this out here on foreign soil. 😬
Terminal needs
reset
after an action run.The immediate and brutal use of
execve
might not be the best strategy.Rather we should let
tea
totea.Quit
itself properly and only thenexecve