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
Running programs in subshells #206
Comments
Good catch and thanks for the report. I can reproduce this on my end. This absolutely something we'll need to fix. We'll keep this thread updated with progress. |
I started digging into it to see if i could figure out how tcell is doing it. Can't promise I can figure out a fix since I don't have much free time anymore but if I can figure out a fix from tinkering around I'll open a PR. |
@meowgorithm saw your comment on #228. That didn't fully resolve the issue for me in my program. Running the program in a subshell no longer gives a ioctl error but instead renders nothing. Then on any keypress a panic ensues when restoring the terminal.
To reproduce
|
@M-Porter thanks for that info. This is definitely something that's not resolved yet and we're very keen to sort this one out. We'll keep this issue updated with progress. |
for sure. i just figured any info along the way would help! |
I'm very interested in this as well, and have been doing a bit of exploration with muesli's help. I wrote up a few proposals: https://gist.github.com/wesen/045b8ef7227ddd8a6951cd308e5d4634 This seems like a separate issue (that I didn't run into yet), but I might take a closer look, to see if it impacts my use case too. |
@wesen I tested proposal 1 and i can use the program in a subshell now but there are still no colors output. |
Hey @M-Porter, if I'm understanding your issue correctly you want to do something similar to https://github.com/charmbracelet/gum (running Bubble Tea programs and using their output) but running the program separately. They way that we got around this was by running the program on
|
I just recently switched my project jumper from using tcell to bubbletea but I have run into some issues with ioctl.
Previously i was able to run my script in a sub command like
cd $(jumper to)
. Now when i try that same command with bubbletea i get the the following error:Some searching in tcell led me to this https://github.com/gdamore/tcell/blob/7946eb8e8d8303b1ee1da909dcdebf448f0b5cb7/nonblock_unix.go#L25-L40
Seems as though bubbletea isn't waiting for the output to drain properly (if im understanding the tcell code correctly.)
The text was updated successfully, but these errors were encountered: