Mac 的命令行配置字体颜色

1.在mac命令行终端输入:

ls -al  查看所有隐藏文件,找到.bash_profile

vi .bash_profile  编辑文件,贴入以下内容并保存

source .bash_profile   刷新文件即时生效

Iterm字体设置
#enables colorin the terminal bash shell export
export CLICOLOR=1

#sets up thecolor scheme for list export
export LSCOLORS=gxfxcxdxbxegedabagacad

#sets up theprompt color (currently a green similar to linux terminal)
export PS1='[33[01;32m]u@h[33[00m]:[33[01;36m]w[33[00m]$ '

#enables colorfor iTerm
export TERM=xterm-256color

#grep 高亮
export GREP_OPTIONS='--color=always' GREP_COLOR='1;35'
#配色结束

原文地址:https://www.cnblogs.com/lily1989/p/8963228.html