eza icon indicating copy to clipboard operation
eza copied to clipboard

bug: Since 0.15.3 EZA_COLORS's size coloring tweaks stopped working

Open bew opened this issue 2 years ago • 14 comments

You can see here I set the user color and the file size (for small files) using EZA_COLORS to the same red color.

In the first test, using eza 0.15.2 both the user and the file size are correctly red. In the second test, using eza 0.15.3 the user is still red but the file size is the default green color. image

Working version, nixpkgs hash: H=657f8ce31927e61a2f2ec1174b882c453e95b38f Not working version, nixpkgs hash: H=7d38cab61f2f72c62d4a943c29662d62df44afcd

nix eval "github:nixos/nixpkgs/$H#eza.version"
nix run "github:nixos/nixpkgs/$H#eza" -- -l some/path

The 0.15.3 is the version that introduced the --color-scale option, which I'm NOT using here.

bew avatar Nov 23 '23 05:11 bew

That has been fixed in 0.16.0. Per the release notes:

We fixed the accidental breaking change with --color-scale suddenly requiring an argument introduced in v0.15.3, now it defaults to all.

You'd need --color-scale=all for 0.15.3.

piechologist avatar Nov 23 '23 07:11 piechologist

I'm NOT using --color-scale, and initially noticed this behavior on 0.16.0 actually image

bew avatar Nov 23 '23 11:11 bew

well it is indeed a bug and not linked to color-scaling

MartinFillon avatar Nov 23 '23 12:11 MartinFillon

This color scale feature is a bit confusing to me, too. I guess you want:

eza -l --color-scale=all --color-scale-mode=fixed  # 0.15.3
eza -l --color-scale-mode=fixed  # 0.16.0+

Unfortunately, the default is --color-scale-mode=gradient which ignores EZA_COLORS even when not using --color-scale.

piechologist avatar Nov 23 '23 12:11 piechologist

For me (using v0.16.0) --color-scale-mode=fixed still does not work for file ages:

image

(For the above I am using EXA_COLORS but it still doesn't work if that is unset.)

ghost avatar Nov 23 '23 12:11 ghost

For me (using v0.16.0) --color-scale-mode=fixed still does not work for file ages:

AFAIK, there's only a single EZA_COLORS's da parameter we can define so, there's no fixed color scale for file ages at all. A bit confusing, really…

piechologist avatar Nov 23 '23 13:11 piechologist

Can confirm above bug in v0.16.0, Linux Mint 21.2: uu and ur work but sn and sb do not:

image

Even though --color-scale is not in use, --color-scale-mode=fixed makes the color tweaks work:

image

ghost avatar Nov 23 '23 14:11 ghost

fixed the size part

MartinFillon avatar Dec 01 '23 23:12 MartinFillon

Helloo o/ Unfortunately I don't think the fix is correct, I lost the ability to configure the unit color, see for yourself:

image

# Should give blue size number, yellow size unit, blue username, yellow date
EZA_COLORS=nm=34:um=33:uu=34:da=33
truncate --size 123M test-file

And then run eza -l test-file (currently at 0.17.0), and I get the size number AND unit as blue, instead of the unit as yellow.

Please re-open :pray:

bew avatar Dec 16 '23 11:12 bew

colors please read this and retry um doesnt exist and nm is for M size unit

MartinFillon avatar Dec 16 '23 21:12 MartinFillon

Hmm they do exist:

https://github.com/eza-community/eza/blob/edcf392c78abd8abea76d4f59fb639ad134a0d8b/man/eza_colors.5.md?plain=1#L135-L136 https://github.com/eza-community/eza/blob/edcf392c78abd8abea76d4f59fb639ad134a0d8b/man/eza_colors.5.md?plain=1#L153-L154

bew avatar Dec 17 '23 09:12 bew

thats my bad guess ctrl-f didnt work

MartinFillon avatar Dec 17 '23 17:12 MartinFillon

@cafkafk (friendly ping) could you re-open? 🙏

edit: thx!

bew avatar Dec 19 '23 10:12 bew

Hello! (friendly ping!) I opened #975 to fix this bug 😉

bew avatar May 21 '24 19:05 bew