备份一个好看的Linux命令行提示符PS1

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
export PS1='\n\e[1;37m[\e[m\e[1;32m\u\e[m\e[1;33m@\e[m\e[1;35m\H\e[m \e[4m`pwd`\e[m\e[1;37m]\e[m\e[1;36m\e[m\n$'
export PS1='\n\e[1;37m[\e[m\e[1;32m\u\e[m\e[1;33m@\e[m\e[1;35m\H\e[m \e[4m`pwd`\e[m\e[1;37m]\e[m\e[1;36m\e[m\n$'
export PS1='\n\e[1;37m[\e[m\e[1;32m\u\e[m\e[1;33m@\e[m\e[1;35m\H\e[m \e[4m`pwd`\e[m\e[1;37m]\e[m\e[1;36m\e[m\n$'

这个PS1的效果如下图所示:

Screenshot from 2014-09-29 10:35:48能够显示当前目录,并且输入命令的地方单独一行,还是很实用的!

Leave a Reply

Your email address will not be published. Required fields are marked *