Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bew opened this issue Nov 23, 2023 · 14 comments · Fixed by #702 · May be fixed by #975
Open

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

bew opened this issue Nov 23, 2023 · 14 comments · Fixed by #702 · May be fixed by #975
Assignees
Labels
errors Something isn't working

Comments

@bew
Copy link
Contributor

bew commented Nov 23, 2023

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.

@piechologist
Copy link

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.

@bew
Copy link
Contributor Author

bew commented Nov 23, 2023

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

@MartinFillon
Copy link
Contributor

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

@piechologist
Copy link

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.

@ghost
Copy link

ghost commented Nov 23, 2023

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

@piechologist
Copy link

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…

@ghost
Copy link

ghost commented Nov 23, 2023

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

@MartinFillon
Copy link
Contributor

fixed the size part

@bew
Copy link
Contributor Author

bew commented Dec 16, 2023

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 🙏

@MartinFillon
Copy link
Contributor

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

@bew
Copy link
Contributor Author

bew commented Dec 17, 2023

Hmm they do exist:

eza/man/eza_colors.5.md

Lines 135 to 136 in edcf392

`nm`
: the numbers of a file’s size if it is between 1 MB/MiB and 1 GB/GiB

eza/man/eza_colors.5.md

Lines 153 to 154 in edcf392

`um`
: the units of a file’s size if it is between 1 MB/MiB and 1 GB/GiB

@MartinFillon
Copy link
Contributor

thats my bad guess ctrl-f didnt work

@bew
Copy link
Contributor Author

bew commented Dec 19, 2023

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

edit: thx!

@bew
Copy link
Contributor Author

bew commented May 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Something isn't working
Projects
None yet
4 participants