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

Don't print colors and progress bar in non-tty mode. #33

Closed
kuredoro opened this issue Sep 28, 2021 · 1 comment · Fixed by #52
Closed

Don't print colors and progress bar in non-tty mode. #33

kuredoro opened this issue Sep 28, 2021 · 1 comment · Fixed by #52
Assignees
Labels
cli Something that concerns command-line utility feature New feature or request
Milestone

Comments

@kuredoro
Copy link
Owner

kuredoro commented Sep 28, 2021

This is easy to do via is-tty package in init(). However, we need to provide a possibility to force color output, even if stdout is not a tty.

Proposition for new cli:

$ cptest --color always --progress-bar always a.out
$ cptest --color never --progress-bar never a.out
@kuredoro kuredoro added feature New feature or request cli Something that concerns command-line utility labels Sep 28, 2021
@kuredoro kuredoro added this to the ver2.03a milestone Oct 16, 2021
@kuredoro
Copy link
Owner Author

We already have an API, so.... what about:

$ scold --force-colors --force-progress a.out
$ scold --no-colors --no-progress a.ou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Something that concerns command-line utility feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant