LSCOLORS does not give a lot of options or control for directory listings. I've tried several ways to use LS_COLORS (the standard method for such things) without success. Is it possible to bypass LSCOLORS and use LS_COLORS directly? (zsh shell, Catalina)

  • 5
    You mean the Linux method for such things. BSD ls uses LSCOLOR. There's no "bypass". Dec 13, 2021 at 5:42
  • I just discovered gls, however, which does the job (and can be aliased to ls as 'gls --colors')
    – rogerl
    Dec 13, 2021 at 16:24

1 Answer 1


Neither of those variables has any special meaning to zsh. They are solely used by ls, which is not an internal program to zsh. However, you have two ls at your disposal on macos:

The ls which comes with the OS, is the BSD variant, and as you can see from the man page, it reacts on LSCOLORS, provided that coloring is enabled (CLICOLOR="Yes").

Then you can install the Gnu Tools on your Mac, which brings you GNU ls (depending on how you installed them, invoked via ls or via gls), and this ls obeys the variable LS_COLORS.

Hence, it all depends on which ls you are using...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .