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 bubbletea apps inside vim gives bad output #797
Labels
bug
Something isn't working
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Being experimenting with running bubbletea programs inside vim/neovim using
:!app
, here's what I've found:Problem 1: stdin and opening a tty
If you don't pass a
WithInput
option, bubbletea will fallback to/dev/stdin
, which is OK, but then it'll try to open a new tty, which fails inside vim.Passing
WithInput(nil)
fixes the issue.Problem 1.2:
WithInput(os.Stdin)
If instead of a
nil
input, you passos.Stdin
directly, you get a even weirder error:Problem 2: ansi escape codes in output
Ok, let's keep the
WithInput(nil)
, if you then run the program from within vim, you'll get ansi escape code sequences all over the place:To be honest, that seems to happen with other things too, e.g., fish shell:
Footnotes
The text was updated successfully, but these errors were encountered: