Bash: one more fix.

This commit is contained in:
Artem Sapegin 2013-02-21 18:50:26 +04:00
parent 5043c86869
commit e608873eb7

View File

@ -52,9 +52,8 @@ function prompt_command() {
[ -n "$user_prompt" ] || [ -n "$host_prompt" ] && login_delimiter=":" [ -n "$user_prompt" ] || [ -n "$host_prompt" ] && login_delimiter=":"
# Format prompt # Format prompt
# \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 # 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\] " PS1="\n$user_prompt$host_prompt$login_delimiter$WHITE$dir_name$NOCOLOR$git_prompt\n\[$CYAN\]$prompt_symbol\[$NOCOLOR\] "
# Terminal title # Terminal title
local title="$(basename $dir_name)" local title="$(basename $dir_name)"