cargo-expand icon indicating copy to clipboard operation
cargo-expand copied to clipboard

Output is unreadable if the terminal uses black text on white background

Open RalfJung opened this issue 11 months ago • 4 comments

Here's a sample screenshot of how cargo expand output looks for me:

image

As you can tell, that's pretty much useless. I have to copy-paste it into an editor to get rid of the formatting and see all the white characters on white background.

RalfJung avatar Feb 28 '24 16:02 RalfJung

https://github.com/dtolnay/cargo-expand?tab=readme-ov-file#configuration

You can use a different theme, there are some suggestions for light backgrounds in the upstream readme https://github.com/sharkdp/bat?tab=readme-ov-file#highlighting-theme

ZymoticB avatar Apr 15 '24 14:04 ZymoticB

Seems not great to require users to do manual configuration to be able to read anything. I have not yet encountered this with any other application. (Some, e.g. aptitude, just overwrite all colors so they are still white-on-black despite by black-on-white terminal theme. But that's fine, the application at least remains usable.)

RalfJung avatar Apr 15 '24 14:04 RalfJung

Can't the default theme be set to use 4bit colors to avoid overriding the terminal color scheme?

maciek134 avatar Jun 22 '24 20:06 maciek134

I would like to add that research shows that reading dark text on a light background is physiologically preferable in most circumstances. A default that doesn't work unless one follows current fashion may not be the best choice.

grothesque avatar Sep 26 '24 10:09 grothesque