Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.35k stars 226 forks source link

Color scheme produces unexpected output since 1.33.0 #860

Closed mzanibelli closed 3 weeks ago

mzanibelli commented 3 months ago

Hello!

I've been experiencing issues with my color scheme since 1.33.0. It happens inside Tmux. Both on Linux + Wayland + Foot (terminal emulator) and on MacOS + Kitty.

The selected_line disappears.

I tested a range of things including compiling the project myself and tinkering with it - to no avail. I'm seeing some similar issues here and there so there might be something wrong still.

Let me know if you need my complete configuration.

Broot 1.32.0: image

Broot 1.36.1: image

mzanibelli commented 3 weeks ago

Found the cause. It's because I had NO_COLOR set to 1. Note: ~there is a bug in Broot where~ setting NO_COLOR to 0 doesn't re-enable colorschemes. You need to unset the variable for it to work as expected.

Canop commented 3 weeks ago

Regarding your note: I'm following this

Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an empty string (regardless of its value), prevents the addition of ANSI color.

If you think NO_COLOR=0 should behave like the variable being absent, please fill an issue. It would probably be better IMO.

mzanibelli commented 3 weeks ago

If you think NO_COLOR=0 should behave like the variable being absent, please fill an issue. It would probably be better IMO.

Actually I read the NO_COLOR spec again and your implementation is correct. That's why I edited my comment (maybe you read it via mail and didn't see the strikethrough text, no worries). I think it's good to follow the "official" behavior.