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
bubbletea's alt screen isn't triggering when run as a bash subcommand #823
Comments
@cpendery As shown in the example in /examples/pipe, bubble tea will automatically create a new terminal by opening a new "dev/tty" and input from the terminal if it determines that input is given from a non-terminal source at startup. However, it does not seem to judge whether the output is other than terminal or not at startup. This is why the I have no workaround for this problem in bubble tea at this time, and I guess that a new feature needs to be implemented. |
Describe the bug
I'm trying to run a bubbletea app as a bash subcommand where all the UI gets sent to an alt window that the user interacts with and when the app closes I can write some data to stdout and capture it. Basically the script would look like
output=$(./fullscreen)
. When I try this with the fullscreen example, it just hangs for 5 seconds without displaying the alt screen. Is this possible to do with bubbletea's implementation? I know it can be done with tcell, and I'm getting back the escape code\E[?25l\E[?1049h\E[2J\E[1;1H\E[1;1H\E[?25l\r
.Setup
Please complete the following information along with version numbers, if applicable.
To Reproduce
Steps to reproduce the behavior:
$(./fullscreen)
\E[?25l\E[?1049h\E[2J\E[1;1H\E[1;1H\E[?25l\r
Source Code
N/A
Expected behavior
I'd think the alternate screen would show for the 5 seconds and then the command would terminate
Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: