当前一次命令执行成功的时候,PS1 为绿色的笑脸符号。 如果是失败,则是红色的 :)
Last active
December 19, 2015 00:18
-
-
Save hellojinjie/5867255 to your computer and use it in GitHub Desktop.
酷酷的 PS1 : )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 第一个是原文的,但是不对的,下面的第二个是我修改的。 | |
// original from http://jamiedubs.com/ps1-collection-customize-your-bash-prompt | |
// export PS1="\[\e[01;32m\]\u@\h \[\e[01;34m\]\W \`if [ \$? = 0 ]; then echo -e '\e[01;32m:)'; else echo -e '\e[01;31m:('; fi\` \[\e[01;34m\]$\[\e[00m\] " | |
export PS1="\[\e[01;32m\]\u@\h \[\e[01;34m\]\W \`if [ \$? = 0 ]; then echo -e '\[\e[01;32m\]:)'; else echo -e '\[\e[01;31m\]:('; fi\` \[\e[01;34m\]$\[\e[00m\] " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment