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

LSCOLORS for MacOS ls #10

Closed
logic opened this issue Jun 21, 2011 · 11 comments
Closed

LSCOLORS for MacOS ls #10

logic opened this issue Jun 21, 2011 · 11 comments

Comments

@logic
Copy link

logic commented Jun 21, 2011

I wasn't quite sure where to post this, so figured an issue off of your repository might be the most likely to be found by others. :) I took a bit of time today and roughly mirrored the base colors that your solarized theme for dircolors gives in OSX's LSCOLORS environment variable:

export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD

It's not nearly as comprehensive (you can't do file-type matching, for example), but it should be close, for those who don't want to replace ls with the GNU version.

@seebi
Copy link
Owner

seebi commented Jun 22, 2011

hi logic, can you provide a screenshot here so that people can see how it looks like. I can link this issue from the README ...

@logic
Copy link
Author

logic commented Jun 22, 2011

Sure, no problem. Here are the default colors:

http://k.min.us/jX7u2.png

And here they are in a Solarized-esque version:

http://k.min.us/jT8h4.png

(Gallery link.)

@seebi
Copy link
Owner

seebi commented Jun 22, 2011

Thanks, I've added a note to this issue ...

@seebi seebi closed this as completed Jun 22, 2011
@teoljungberg
Copy link

There is also another way.
You can install coreutils from homebrew and use that without replacing the OS X tools. Since they are installed with 'g' as the prefix
in your .bashrc, .profile or .bash_profile add this line
"
# Load GNU aliases
source /usr/local/Cellar/coreutils/8.12/aliases
"
and alias ls to GNUs alias
"
alias ls='gls --color=auto'
"
and of course add the aliases to coreutils before the ls alias
"
# Load GNU aliases
source /usr/local/Cellar/coreutils/8.12/aliases
"

@PhilHudson
Copy link

coreutils can also be installed from the fink and MacPorts repositories (older alternatives to homebrew). Choose one and stick with it; don't mix them!

mmrwoods pushed a commit to mmrwoods/dotfiles that referenced this issue Dec 5, 2013
yous added a commit to yous/dotfiles that referenced this issue Aug 2, 2014
@zevaverbach
Copy link

@teoljungberg is "aliases" meant to be a directory or file (8.23_1 has no such file/directory)? what should be done after adding these lines to .bashrc/.bash_profile to make this work?

@teoljungberg
Copy link

@zevav It was when I wrote up that guideline, but after looking into it now I can see that it's not a directory. If you use homebrew as I used, and if you have /usr/local/bin in your path you have all of these in your PATH already. You can just alias ls to gls

@lukebp
Copy link

lukebp commented Dec 7, 2016

If you install GNU coreutils with homebrew, the eval `dircolors /path/to/dircolorsdb` command from the documentation will need to be changed to eval `gdircolors /path/to/dircolorsdb` .

@antoineco
Copy link

antoineco commented Apr 16, 2018

I'd like to share my LSCOLORS which seems slightly closer to dircolors.ansi-dark, for those of you who use the actual Solarized palette in your terminal.

LSCOLORS=exfxfeaeBxxehehbadacea

Because the original screenshots disappeared I made some myself:

Comparison

With the OP's value:

op

With the value I shared:
(note the color of regular directories, directory777, and absence of boldness for non-executables)

custom

On Linux with dircolors.ansi-dark:

linux

shrop added a commit to shrop/dotfiles that referenced this issue Jun 3, 2018
@levelont
Copy link

@jspv
Copy link

jspv commented May 7, 2020

Any chance there is a more recent LSCOLORS example that matches the ones in this repository? For example, the symbolic link in this repo's discolors example is cyan (light blue), the LSCOLORS in this thread and screenshots show it as magenta (bright purple).

Okeanos added a commit to Okeanos/dotfiles that referenced this issue Dec 11, 2021
colors for less based on seebi/dircolors-solarized#10

remove obsolete and wonky TERMCAP settings for less
bjornconnolly added a commit to bjornconnolly/dotfiles that referenced this issue Aug 17, 2022
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

9 participants