我剛剛編輯了我的.bash_profile來添加git分支顯示。我將它基於我在網上找到的一個版本,但是現在當我在shell中寫入一些內容時,它會覆蓋第一行,然後開始換行到新行。Bash重複第一行
function proml {
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\[email protected]\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
PS1="${TITLEBAR}\
\w$WHITE\$(parse_git_branch)\\e[m$ "
,這是parse_git_branch功能
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/'
}
因爲我不知道很多關於我的.bash_profile不知道哪裏的錯誤是什麼?
我有在最後的大括號,我只是不包括它,因爲有一對夫婦更行功能完成 – eytanfb 2013-03-27 05:52:50