dtolnay/cargo-expand

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

RalfJung opened this issue · 3 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.

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

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.)

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