Bash: new prompt bug fixes.

This commit is contained in:
Artem Sapegin 2013-02-21 18:45:15 +04:00
parent 0a366a0b5f
commit 5043c86869

View File

@ -52,7 +52,9 @@ function prompt_command() {
[ -n "$user_prompt" ] || [ -n "$host_prompt" ] && login_delimiter=":"
# Format prompt
PS1="\n$user_prompt$host_prompt$login_delimiter$WHITE$dir_name$NOCOLOR$git_prompt\n$CYAN$prompt_symbol$NOCOLOR "
# \033[G moves the cursor to the first column: http://jonisalonen.com/2012/your-bash-prompt-needs-this/
# Text (commands) inside \[...\] does not impact line length which fixes stange bug when looking through the history
PS1="\033[G\n$user_prompt$host_prompt$login_delimiter$WHITE$dir_name$NOCOLOR$git_prompt\n\[$CYAN\]$prompt_symbol\[$NOCOLOR\] "
# Terminal title
local title="$(basename $dir_name)"