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

Colored output support #30

Closed
epage opened this issue Jul 13, 2019 · 5 comments · Fixed by #244
Closed

Colored output support #30

epage opened this issue Jul 13, 2019 · 5 comments · Fixed by #244
Labels
enhancement Improve the expected

Comments

@epage
Copy link
Collaborator

epage commented Jul 13, 2019

This would be relatively easy while improving the scannability of the results.

@epage epage added the enhancement Improve the expected label Jul 13, 2019
@epage
Copy link
Collaborator Author

epage commented Sep 14, 2020

Maybe https://docs.rs/yansi/0.5.0/yansi/ ?

@epage
Copy link
Collaborator Author

epage commented Nov 20, 2020

An alternative approach to color is

@epage
Copy link
Collaborator Author

epage commented Jan 9, 2021

Update on options:

  • I looked into annotate-snippets but it doesn't seem to support all of our use cases.
  • termcolor is also used by env_logger, so using it here means we aren't adding any dependencies.
  • But yansi has a nice API

I'm assuming we'd have CLI arg for forcing on, forcing off with a default of auto-discover. The question is whether to do --color / --no-color like some tools or to mirror ls:

     --color[=WHEN]         colorize the output; WHEN can be 'never', 'auto',
                               or 'always' (the default); more info below

@epage
Copy link
Collaborator Author

epage commented May 3, 2021

See also https://no-color.org/

epage referenced this issue in epage/typos May 12, 2021
This supports
- Basic capability detection
- NO_COLOR env variable
- tty detection
- CLI overrides

This does not yet support CLICOLOR.  I'll be trying to upstream all of
this into `yansi` and get it taken care of there.

This only supports Windows Anniversary edition and later which I think
is a fine compromise due to the ergonomic difference between `yansi` and
`termcolor`.

Fixes #30
epage referenced this issue in epage/typos May 12, 2021
This supports
- Basic capability detection
- NO_COLOR env variable
- tty detection
- CLI overrides

This does not yet support CLICOLOR.  I'll be trying to upstream all of
this into `yansi` and get it taken care of there.

This only supports Windows Anniversary edition and later which I think
is a fine compromise due to the ergonomic difference between `yansi` and
`termcolor`.

Fixes #30
epage referenced this issue in epage/typos May 13, 2021
This supports
- Basic capability detection
- NO_COLOR env variable
- tty detection
- CLI overrides

This does not yet support CLICOLOR.  I'll be trying to upstream all of
this into `yansi` and get it taken care of there.

This only supports Windows Anniversary edition and later which I think
is a fine compromise due to the ergonomic difference between `yansi` and
`termcolor`.

Fixes #30
epage referenced this issue in epage/typos May 13, 2021
This supports
- Basic capability detection
- NO_COLOR env variable
- tty detection
- CLI overrides

This does not yet support CLICOLOR.  I'll be trying to upstream all of
this into `yansi` and get it taken care of there.

This only supports Windows Anniversary edition and later which I think
is a fine compromise due to the ergonomic difference between `yansi` and
`termcolor`.

Fixes #30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve the expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant