Wednesday 15 September 2010

.bash profile - Bash repeating first line -


I've just edited my.bash_profile to add git branch display. I was based on the version that I found online, but now when I write something in the shell, at the end of the line, it overwrites the first line, then it wraps in the new line.

  function promail {case $ TERM * in xterm} TITLEBAR = '\ [\ 033] 0; \ U @ \ h: \ w \ 007 \] ';; *) TITLEBAR = "" ;; ASAC PS1 = "$ {TITLEBAR} \ \ w $ WHITE \ $ (parse_git_branch) \\ E [M $]"   

And this is the parse_git_branch function

 < Code> Function parse_git_branch {git branch - no color 2 & gt; / Dev / null | Sed -e '/ ^ [^ *] / d' -e 's / * \ (. * *) / [\ 1] /'}   

Since I do not know Bash_profile More about that I do not know where is the mistake?

Is this a problem? proml function & gt ;?

  Function Prom {a missing brace at end of case $ TERM * in xterm) TITLEBAR = '\ [\ 033] 0; \ U @ \ H: \ w \ 007 \] ';; *) TITLEBAR = "" ;; ASAC PS1 = "$ {TITLEBAR} \ \ w $ WHITE \ $ \ (parse_git_branch) \\ E [M $"}    

No comments:

Post a Comment