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

Non-animated mode for CLI #534

Open
expede opened this issue Jun 28, 2021 · 1 comment
Open

Non-animated mode for CLI #534

expede opened this issue Jun 28, 2021 · 1 comment
Labels
💗 enhancement New feature or request 🔰 good first issue Good for newcomers 🐇 quick Low effort to implement / fix — a few hours at most

Comments

@expede
Copy link
Member

expede commented Jun 28, 2021

NB: Feature requests will only be considered if they solve a pain

Summary

Problem

Animations break in some shells, like in GH Actions:

Screen Shot 2021-06-28 at 10 00 05

Impact

Mostly it just looks unclean 🧼

Solution

Abstract over our animations, and have a toggle for animated or not

@expede expede added 💗 enhancement New feature or request 🔰 good first issue Good for newcomers 🐇 quick Low effort to implement / fix — a few hours at most labels Jun 28, 2021
@QuinnWilton
Copy link
Contributor

I don't know about Github actions in particular, but one option is to rely on isatty(3) to check whether stdout is attached to a terminal. There's more complex checks you can do with terminfo(5) if you're concerned about the exact capabilities supported by the terminal, but for the purposes of this issue it's probably enough to just disable animations by default if you're not working with a tty.

Explicit flags are nice too though!

Is this still an issue that you're interested in, and if so, do you have a preference on the exact approach?

https://man7.org/linux/man-pages/man3/isatty.3.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💗 enhancement New feature or request 🔰 good first issue Good for newcomers 🐇 quick Low effort to implement / fix — a few hours at most
Projects
None yet
Development

No branches or pull requests

2 participants