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

feat: allow acquiring terminal when running snippets #366

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

mfontanini
Copy link
Owner

This introduces a new +acquire_terminal snippet attribute which causes the snippet to take ownership of the terminal while the contents of it are being executed. This means the output won't be displayed inside the presentation but instead the presentation will pause, invoke the code snippet, and resume after the snippet is done. This is useful when running TUIs as otherwise those won't run given the terminal is taken by presenterm already.

Fixes #365

@mfontanini mfontanini force-pushed the feat/acquire-terminal branch from 5c6c8bf to d22910c Compare September 10, 2024 03:00
@mfontanini mfontanini marked this pull request as ready for review September 12, 2024 22:49
@mfontanini mfontanini merged commit 2f6fb6e into master Sep 12, 2024
6 checks passed
@mfontanini mfontanini deleted the feat/acquire-terminal branch September 12, 2024 22:49
@orhun
Copy link
Contributor

orhun commented Sep 15, 2024

I was wondering if it would be also possible to see the output of the command on stdout while running something like:

```bash +exec +acquire_terminal
cargo run --manifest-path ratatui/Cargo.toml --example flex
```

So that we will be able to see the cargo run command running before it launches the TUI. Otherwise there is no indicator of whether if the build is ongoing or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolving imports for Rust code execution
2 participants