why bash history overlap the prompt when scroll up in the history?
I customized my bash prompt, PS1 value.
~/.bashrc
Color_Off='\e[0m' # Text Reset
BGreen='\e[1;32m' # Green
BPurple='\e[1;35m' # Purple
BWhite='\e[1;37m' # White
BIBlue='\e[1;94m' # Blue
PS1="[\[$BGreen\w\]\[$Color_Off\]]\n[\[$BPurple\u\]\[$BWhite\]@\[$BIBlue\h\]\[$Color_Off\]]\$ "
When I scroll up in the history with up arrow from the keyboard, after a lot of command I can see these:
[/etc]
[bicocca@bicoccag]$ vi
[/etc]
[bicocca@bicoccag]$ vim
[/etc]
[bicoclear
The command overlap the prompt. How I can resolve the issue? I try to searching in google by I do not found anything. Thanks in advance!!
Guido.
I am using RHEL6.4.
I customized my bash prompt, PS1 value.
~/.bashrc
Color_Off='\e[0m' # Text Reset
BGreen='\e[1;32m' # Green
BPurple='\e[1;35m' # Purple
BWhite='\e[1;37m' # White
BIBlue='\e[1;94m' # Blue
PS1="[\[$BGreen\w\]\[$Color_Off\]]\n[\[$BPurple\u\]\[$BWhite\]@\[$BIBlue\h\]\[$Color_Off\]]\$ "
When I scroll up in the history with up arrow from the keyboard, after a lot of command I can see these:
[/etc]
[bicocca@bicoccag]$ vi
[/etc]
[bicocca@bicoccag]$ vim
[/etc]
[bicoclear
The command overlap the prompt. How I can resolve the issue? I try to searching in google by I do not found anything. Thanks in advance!!
Guido.
I am using RHEL6.4.