mac終端配色

 

1. 終端輸入git

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


2. brew installxz coreutils

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

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


 if brew list | grep coreutils > /dev/null ; then
brewinstallxz coreutils

ifbrew list |grepcoreutils >/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自定義文件的顏色,此文件中的註釋已經包含各類顏色取值的說明。
 
 
相關文章
相關標籤/搜索