來源:http://wonderffee.github.io/blog/2013/08/15/solve-new-line-problem-in-terminal/git
.bash_profile中 進行以下配置:github
PS1="\[\e[0;31m\] \u@\h \W\$ \[\e[m\] "bash
以前的輸入命令 不到屏幕末端 自動換行覆蓋的問題獲得解決。spa
其餘:code
終端的顏色顯示,最終在.bash_probile裏作的設置以下:blog
COLOR_BOLD="\[\e[1m\]" COLOR_DEFAULT="\[\e[0m\]" export CLICOLOR=1 export GREP_OPTIONS="--color=auto" PS1='\[\e[01;33m\]\u@\h \W\$\[\e[m\] '