colored-rs / colored

(Rust) Coloring terminal so simple you already know how to do it !

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no colored output when used in conjunction with package 'pager'

soenkehahn opened this issue · comments

When using the colored crate together with the pager crate it doesn't produce colored output.

Here's a repo that reproduces this behavior: https://github.com/soenkehahn/colored-bug
In there, cargo run should produce the word foo in red to stdout, but it's not red.

This used to work in version 1.8.0. The commit where this stopped working seems to be this one: 4af2de0

Hi @soenkehahn,

This is similar to #69.

The most likely solution is to force colouring using colored::control::set_override(true);.

Yes, that does it. Thanks!