美文网首页
Mac OS 终端彩色显示配置

Mac OS 终端彩色显示配置

作者: 观星汉 | 来源:发表于2018-12-08 19:28 被阅读0次

打开一个终端, 编辑 ~/.profile 文件. 添加如下内容:

# Tell ls to be colourful
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
 
# Tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
export TERM="xterm-color" 
export PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ '

让修改生效:

leo@Hac:~$ source ~/.profile

相关文章

网友评论

      本文标题:Mac OS 终端彩色显示配置

      本文链接:https://www.haomeiwen.com/subject/lofchqtx.html