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

ls: gnu test case color-ext compatibility #6536

Closed
matrixhead opened this issue Jul 4, 2024 · 3 comments · Fixed by #6537
Closed

ls: gnu test case color-ext compatibility #6536

matrixhead opened this issue Jul 4, 2024 · 3 comments · Fixed by #6537
Labels

Comments

@matrixhead
Copy link
Contributor

matrixhead commented Jul 4, 2024

The GNU test case color-ext was failing because our ls command doesn't handle suffix letter cases.

example 1

touch img1.jpg IMG2.JPG img3.JpG file1.z file2.Z
LS_COLORS="*.jpg=01;35:*.JPG=01;35;46" ls -U1 --color=always   img1.jpg IMG2.JPG img3.JpG

our ls would produce output

^[0m^[01;35;46mimg1.jpg^[0m
^[01;35;46mIMG2.JPG^[0m
^[01;35;46mimg3.JpG^[0m

but it should be

^[0m^[01;35mimg1.jpg^[0m
^[01;35;46mIMG2.JPG^[0m
img3.JpG

like wise

example 2

LS_COLORS="*.jpg=01;35;46:*.jpg=01;35:*.JPG=01;35;46"   ls -U1 --color=always img1.jpg IMG2.JPG img3.JpG 

our ls would give

^[0m^[01;35;46mimg1.jpg^[0m
^[01;35;46mIMG2.JPG^[0m
^[01;35;46mimg3.JpG^[0m

but it should be

^[0m^[01;35mimg1.jpg^[0m
^[01;35;46mIMG2.JPG^[0m
img3.JpG

In both cases, this is happening because lscolors doesn't care about the case sensitivity of the entries in the env.

@sylvestre
Copy link
Contributor

ls command doesn't handle suffix letter cases

what do you mean by this ? :)

@matrixhead
Copy link
Contributor Author

sorry, I was typing it and accidentally pressed Ctrl+enter

@matrixhead
Copy link
Contributor Author

I already made an issue in lscolors's repo and working on a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants