-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
lib/appearance: export $CLICOLOR
instead of $LSCOLOR
#2028
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
;$CLICOLOR
is not used anywhere, overload it to count the number of colors available for use elsewhere.Motivation and Context
Exporting
$LSCOLOR
fromlib/appearance
has always been weird to me and it took me a few rounds to figure out why: it's not useful. BSDls
enables color output if$CLICOLOR
is set (to any value, even blank), and GNUls
doesn't use any variable to enable color listings. (GNUls
requires--color=auto
or 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 BSDls
have 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.txt
and formatted it usinglint_clean_files.sh
.