mac终端配色

 

1. 终端输入

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"


2. brew installxz coreutils

3. gdircolors --print-database > ~/.dir_colors

4. 在~/.bash_profile配置文件中加入以下代码:


 if brew list | grep coreutils > /dev/null ; then
     PATH= "$(brew --prefix coreutils)/libexec/gnubin:$PATH"
     alias ls = 'ls --show-control-chars --color=auto'
     eval `gdircolors -b $HOME/.dir_colors`
  fi
 
 
5.    dircolor的作用就是设置ls命令使用的环境变量LS_COLORS(BSD是LSCOLORS),我们可以修改~/.dir_colors自定义文件的颜色,此文件中的注释已经包含各种颜色取值的说明。
 
 
 

你可能感兴趣的:(mac)