lib/appearance: export $CLICOLOR instead of $LSCOLOR#2028
lib/appearance: export $CLICOLOR instead of $LSCOLOR#2028NoahGorny merged 4 commits intoBash-it:masterfrom
$CLICOLOR instead of $LSCOLOR#2028Conversation
f640bb9 to
98b90cd
Compare
816860b to
6d4ba6b
Compare
|
Something related to the code touched here is that |
Yes, that all sounds like we should address. I would have to spin up a Linux to play with GNU |
6e9835a to
5b5066b
Compare
|
I found that |
5b5066b to
6779000
Compare
$LSCOLORS here$LSCOLORS && $LS_COLORS
|
I made |
cbfd537 to
8594864
Compare
883b0ab to
fa7bf25
Compare
NoahGorny
left a comment
There was a problem hiding this comment.
This is a slightly breaking change, as users will have to enable the plugin so things will work as expected. I am okay with it though
4f207d3 to
ca1113c
Compare
|
I'm sorry, I've wrapped around again and I don't think this should be it's own plugin anymore. I think this should be in |
ca1113c to
060c04e
Compare
$LSCOLORS && $LS_COLORS$CLICOLOR instead of $LSCOLOR
|
Ok guys, totally re-did this branch. Can you check it out again? |
060c04e to
2c443c3
Compare
5f2169f to
af2418e
Compare
NoahGorny
left a comment
There was a problem hiding this comment.
Is this ready @gaelicWizard ?
I am okay with merging it
|
👍 |
Alsö, since the *value* of `$CLICOLOR` is not used anywhere, overload it to count the number of colors available for use elsewhere.
af2418e to
0286a50
Compare
Description
$CLICOLOR, instead of$LSCOLORS, and add a comment to the base theme to help theme authors;shellcheck;$CLICOLORis not used anywhere, overload it to count the number of colors available for use elsewhere.Motivation and Context
Exporting
$LSCOLORfromlib/appearancehas always been weird to me and it took me a few rounds to figure out why: it's not useful. BSDlsenables color output if$CLICOLORis set (to any value, even blank), and GNUlsdoesn't use any variable to enable color listings. (GNUlsrequires--color=autoor similar.) The$LSCOLORS(BSD) and$LS_COLORS(GNU) variables do not enable color listings; they just specify which color scheme to use (with incompatible formats).Themes can and should customize
$LSCOLORS/$LS_COLORS, but this should not be hard-coded by the main files. Both GNU and BSDlshave default colors they use when these variables are not set.Alsö resolves #2082.
How Has This Been Tested?
This is part of my main branch, and I've tested to make sure it loads, and the test suite passes.
Types of changes
Checklist:
clean_files.txtand formatted it usinglint_clean_files.sh.