博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
bashrc - PS1(提示符配色)
阅读量:4654 次
发布时间:2019-06-09

本文共 1607 字,大约阅读时间需要 5 分钟。

PS1设置:

liBlack="\[\033[0;30m\]"

boBlack="\[\033[1;30m\]"
liRed="\[\033[0;31m\]"
boRed="\[\033[1;31m\]"
liGreen="\[\033[0;32m\]"
boGreen="\[\033[1;32m\]"
liYellow="\[\033[0;33m\]"
boYellow="\[\033[1;33m\]"
liBlue="\[\033[0;34m\]"
boBlue="\[\033[1;34m\]"
liMagenta="\[\033[0;35m\]"
boMagenta="\[\033[1;35m\]"
liCyan="\[\033[0;36m\]"
boCyan="\[\033[1;36m\]"
liWhite="\[\033[0;37m\]"
boWhite="\[\033[1;37m\]"
#PS1="\n$boGreen\u$liWhite at $boBlue\h$liWhite in $boRed\w $liYellow{\[\`let exitstatus=\$? ; if [[ \${exitstatus} != 0 ]] ; then echo \"\${exitstatus}\" ; else echo "0" ; fi\`\]} \n% $liWhite"
PS1="\n$boGreen\u$liWhite at $boBlue\h$liWhite in $boRed\w $liYellow{\[\`let exitstatus=\$? ; if [[ \${exitstatus} != 0 ]] ; then echo \"\${exitstatus}\" ; else echo "0" ; fi\`\]}  $boCyan\d   $boRed\t \n$boRed------------------->\$ $liYellow"

 

 

Mac 配置:

export LS_OPTIONS='--color=auto'

export CLICOLOR='Yes'

export LSCOLORS='ExfxcxdxCxegedabagacad'

 

"ExfxcxdxCxegedabagacad"的各个字母代表指代的不同颜色:

a blackb redc greend browne bluef magentag cyanh light greyA bold black, usually shows up as dark greyB bold redC bold greenD bold brown, usually shows up as yellowE bold blueF bold magentaG bold cyanH bold light grey; looks like bright whitex default foreground or background

LSCOLOR上方各个字母的次序指代的不同命令:

1. directory2. symbolic link3. socket4. pipe5. executable6. block special 7. character special 8. executable with setuid bit set 9. executable with setgid bit set 10. directory writable to others, with sticky bit 11. directory writable to others, without sticky

转载于:https://www.cnblogs.com/drizzlewithwind/p/4868634.html

你可能感兴趣的文章
1035等差数列末项计算
查看>>
CDMA鉴权
查看>>
ASP.NET MVC Identity 兩個多個連接字符串問題解決一例
查看>>
过滤器与拦截器区别
查看>>
第二阶段站立会议7
查看>>
JAVA多线程
查看>>
delphi 更改DBGrid 颜色技巧
查看>>
POJ 2031 Building a Space Station
查看>>
面向对象1
查看>>
任意阶幻方(魔方矩阵)C语言实现
查看>>
织梦教程
查看>>
杭电多校 Harvest of Apples 莫队
查看>>
C/C++心得-结构体
查看>>
函数名作为参数传递
查看>>
apt-get for ubuntu 工具简介
查看>>
数值计算算法-多项式插值算法的实现与分析
查看>>
day8-异常处理与网络编程
查看>>
Python基础-time and datetime
查看>>
Linux epoll 笔记(高并发事件处理机制)
查看>>
shell脚本练习01
查看>>