I just switched to a Macbook Air. I installed zsh using homebrew, but when I use some of the code that I (originally had) in my .zshrc, I get an error saying that .dircolors was not found.Below is the code in question:zstyle ':completion:*' auto-description 'specify: %d'zstyle ':completion:*' completer _expand _complete _correct _approximatezstyle ':completion:*' format 'Completing %d'zstyle ':completion:*' group-name ''zstyle ':completion:*' menu select=2eval $(dircolors -b)zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}zstyle ':completion:*' list-colors ''zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%szstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'zstyle ':completion:*' menu select=longzstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%szstyle ':completion:*' use-compctl falsezstyle ':completion:*' verbose truezstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'Is dircolors not shipped with Mac OS X? How should I install it? Update:If I run dircolors directly on the shell I get:bash: dircolors; command not found
Mac OS X: dircolors not found?
shell;osx;coreutils
The command dircolors is specific to GNU coreutils, so you'll find it on non-embedded Linux and on Cygwin but not on other unix systems such as OSX. The generated settings in your .zshrc aren't portable to OSX.Since you're using the default colors, you can pass an empty string to thelist-colors to get colors in file completions.For colors with the actual ls command, set the CLICOLOR environment variable on OSX, and also set LSCOLORS (see the manual for the format) if you want to change the colors.if whence dircolors >/dev/null; then  eval $(dircolors -b)  zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}  alias ls='ls --color'else  export CLICOLOR=1  zstyle ':completion:*:default' list-colors ''fiIf you wanted to set non-default colors (dircolors with a file argument), my recommendation would be to hard-code the output of dircolors -b ~/.dircolors in your .zshrc and use these settings for both zsh and GNU ls.LS_COLORS=zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}if whence dircolors >/dev/null; then  export LS_COLORS  alias ls='ls --color'else  export CLICOLOR=1  LSCOLORS=fi