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='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
#enables colorfor iTerm
export TERM=xterm-256color
#grep 高亮
export GREP_OPTIONS='--color=always' GREP_COLOR='1;35'
#配色结束
本文介绍如何在Mac的终端中配置颜色方案,包括启用终端颜色显示、设置文件列表的颜色方案、定制提示符颜色以及为Iterm2设置256色。此外还介绍了如何使grep命令的输出带有颜色高亮。
946

被折叠的 条评论
为什么被折叠?



