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

multiple definitions #130

Open
flux242 opened this issue May 3, 2019 · 8 comments
Open

multiple definitions #130

flux242 opened this issue May 3, 2019 · 8 comments

Comments

@flux242
Copy link

flux242 commented May 3, 2019

$ diff -Nur .dircolors <(wget -o /dev/null -qO- https://raw.githubusercontent.com/trapd00r/LS_COLORS/master/LS_COLORS) | wc -l
0

$ grep -E '^..+' .dircolors | awk '{print $1}' | sort | uniq -D
.asc
.asc
.dmg
.dmg
.enc
.enc
.eps
.eps
.jsm
.jsm
.midi
.midi
.pod
.pod
.ps
.ps
.sig
.sig
.t
.t

@rpdelaney
Copy link
Collaborator

Thank you. I'm vaguely aware of this problem but haven't got around to looking into it. I wonder how many of the duplicates are in the "undefined" section at the bottom. Perhaps we should get rid of that.

Ideally this would be tested by some kind of CI system so we would know if a PR introduces dupes.

@flux242
Copy link
Author

flux242 commented May 3, 2019

do you mean 'unsorted' ? Anyway, all current duplicates are listed in my first comment. In the oneliner to find all duplicates above the escape in the grep's regex was eaten though. The dot after ^ should be escaped

@rpdelaney
Copy link
Collaborator

vifm has a utility that helps with this called vifm-convert-dircolors:

$ vifm-convert-dircolors LS_COLORS > lscolors.vifm
Different attributes for extension in different cases: \.pl at /usr/local/bin/vifm-convert-dircolors line 216, <DIRCOLORS> line 191.
Different attributes for extension in different cases: \.eps at /usr/local/bin/vifm-convert-dircolors line 216, <DIRCOLORS> line 381.
Different attributes for extension in different cases: \.ps at /usr/local/bin/vifm-convert-dircolors line 216, <DIRCOLORS> line 384.
Different attributes for extension in different cases: \.midi at /usr/local/bin/vifm-convert-dircolors line 216, <DIRCOLORS> line 445.
Different attributes for extension in different cases: \.dmg at /usr/local/bin/vifm-convert-dircolors line 216, <DIRCOLORS> line 510.
Different attributes for extension in different cases: \.pod at /usr/local/bin/vifm-convert-dircolors line 216, <DIRCOLORS> line 668.
Different attributes for extension in different cases: \.t at /usr/local/bin/vifm-convert-dircolors line 216, <DIRCOLORS> line 702.
Argument "target" isn't numeric in numeric eq (==) at /usr/local/bin/vifm-convert-dircolors line 321.

@rpdelaney
Copy link
Collaborator

rpdelaney commented Aug 12, 2019

The ones missing from vifm's list are because the definitions aren't different. They're just repeated. I'll remove those.

As for the others:

Suggested conflict resolutions:

Extension Groups Resolution
.ps vector, words words
.eps vector, words words
.midi audio, lossless lossless
.dmg apps, images apps
.pod markup, unsorted markup
.t perl(?), unsorted remove

Edit: I'm also moving .epsf into words

@rpdelaney
Copy link
Collaborator

rpdelaney commented Aug 12, 2019

.pl and .PL have different colors for mysterious reasons. I'm not a perl guy but some person in #perl on freenode says

a file called Something.PL in a dist directory is expected to be run sometime during the dist build process to generate a file called Something.

They also told me that perl uses .t by default for tests.

This exposes the need for better persistent documentation of wtf these filenames are.

@rpdelaney
Copy link
Collaborator

@trapd00r I vaguely remember us talking about you building some wild database for extensions, did you make any progress with htat?

@trapd00r
Copy link
Owner

trapd00r commented May 23, 2021

.pl and .PL have different colors for mysterious reasons. I'm not a perl guy but some person in #perl on freenode says

a file called Something.PL in a dist directory is expected to be run sometime during the dist build process to generate a file called Something.

Yes, .PL is colored the same as a Makefile with no extension because it's almost always 'Makefile.PL'.

They also told me that perl uses .t by default for tests.

Correct.

@trapd00r
Copy link
Owner

trapd00r commented May 23, 2021

@trapd00r I vaguely remember us talking about you building some wild database for extensions, did you make any progress with htat?

Well, we made this: #112 (comment) and blew up our environment in the process. Haven't tested the last comment in that thread.

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

No branches or pull requests

3 participants