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

Encourage colored-output common practices #18

Closed
epage opened this issue May 11, 2021 · 3 comments
Closed

Encourage colored-output common practices #18

epage opened this issue May 11, 2021 · 3 comments

Comments

@epage
Copy link

epage commented May 11, 2021

Providing a default path for getting people to follow common practices

  • Will help encourage people to do so
  • Ensure people consistently implement the semantics (including precedence levels)

Common practices include:

Since the CLI arg would involve integrating with another crate in the public API (like structopt / clap3), unsure whether that should be left to another crate to avoid coupling their breaking changes to yansi's.

@SergioBenitez
Copy link
Owner

As with #20, I don't think these decisions should be up to yansi.

Ensuring people call enable_windows_ascii and disable color when it fails ---color=<always|auto|never>.

I do think we should automate this, however. I've opened #25.

@epage
Copy link
Author

epage commented Jun 14, 2021

To be clear, I wouldn't put this directly in yansi but a yansi-detect or clap-yansi crate. People can opt-in as they wish, depending on the crate, calling the initialization, and filtering their color palettes accordingly but having a default policy to get people up and running on best practices is a big ergonomic win and developing the two together is also a big help for users.

@SergioBenitez
Copy link
Owner

I'm happy to support any efforts technically, but I have no opinion on which standard/policy users should follow.

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