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

No colors with less -r #128

Open
pronebird opened this issue Mar 4, 2023 · 1 comment
Open

No colors with less -r #128

pronebird opened this issue Mar 4, 2023 · 1 comment

Comments

@pronebird
Copy link

pronebird commented Mar 4, 2023

Does not seem to produce colored output when using with | less -r or | grep. Not sure what changed. Used cli_tables before and everything seemed to work fine.

@hwittenborn
Copy link
Member

Hey! I'm a new contributor to this project, but I'll be helping to keep things going forward for the crate.

I'm pretty sure this is due to here:

&& atty::is(atty::Stream::Stdout),

Which disables coloring when you're not using a TTY (which I'm pretty sure is the case when you're piping out to another program). I'm still figuring out if this is supposed to be intended behavior, but I'll let you know once I figured out otherwise. In the meantime you can still set the CLICOLOR_FORCE variable to force color to be enabled though.

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