lsd-rs / lsd

The next gen ls command
Apache License 2.0
13.16k stars 429 forks source link

No way to set a theme color to the default foreground color #896

Open Nemo157 opened 1 year ago

Nemo157 commented 1 year ago

crossterm::style::Color only supports the 8-bit ansi color codes, there is no way to make it emit code 39 which uses the default foreground color (which can be distinct from the normal and bright variants of both white and black).

As a workaround, adding support for parsing a string like reset to Color::Reset should give a similar result.

Destroy666x commented 11 months ago

Yes, please add support for Reset as it currently does not work: https://docs.rs/crossterm/latest/crossterm/style/enum.Color.html#variant.Reset

zwpaper commented 11 months ago

/kind enhancement

Destroy666x commented 11 months ago

Fixing above would likely be the easiest way to fix this from what I see, as this just uses the deserialization. Otherwise a workaround is needed.