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

Is it possible to create "inline" programs? #1067

Open
rhodeon opened this issue Jan 5, 2025 · 1 comment
Open

Is it possible to create "inline" programs? #1067

rhodeon opened this issue Jan 5, 2025 · 1 comment

Comments

@rhodeon
Copy link

rhodeon commented Jan 5, 2025

I'm evaluating tview against bubbletea for a basic CLI tool. While tview ticks most of my boxes, an essential functionality I need is launching the program inline in the terminal.

For example, from the bubbletea textarea demo:

bubbletea.mp4

Here the program runs directly in the shell session and ending it returns to the prompt, all in an uninterrupted view.

On the other hand, with the tview textarea demo, a new screen session is created which replaces the parent view entirely until the program ends:

tview.mp4

Is the bubbletea behaviour possible to configure with tview? I have tried setting the fullscreen attribute of the root to false, but that only affects the newly launched screen.

I see tview makes use of the gdamore/tcell library for launching the screen, so perhaps this is beyond its scope.

@digitallyserviced
Copy link
Contributor

digitallyserviced commented Feb 21, 2025

@rhodeon
What you are seeing is the difference between invoking the alternate screen (tcell/tview) vs. normal stdout (bubbletea).

Now I do not know how this will work or if it will at all.

TCELL_ALTSCREEN=disable go run ./main.go

Essentially that env var should stop tcell from using the alternate screen. Export it, declare before running your app or go runing it

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

2 participants