搜尋此網誌

2014年10月17日 星期五

Bash Prompt PS1

參考
https://wiki.archlinux.org/index.php/Color_Bash_Prompt

http://bashrcgenerator.com/
https://www.kirsle.net/wizards/ps1.html


設計了這兩種...
export PS1="\[$(tput bold)\]\[$(tput setaf 2)\]\u\[$(tput setaf 4)\]@\[$(tput setaf 3)\]\h \[$(tput setaf 6)\]\w\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"

export PS1="\[\e[00;36m\]\h\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[00;33m\]\u\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;32m\]\w\[\e[0m\]\[\e[00;37m\]\\$ \[\e[0m\]"

沒有留言:

張貼留言