D******y 发帖数: 3780 | 1 CentOS 5.3 64bit
I set export PS1="\[$(tput setaf 2)\]\u@\h:\w # \[$(tput sgr0)\]" in my .
bashrc
if I press enter without any commands, the cursor will move it to the middle
of the prompt like the following:
root@server [cursor] /var/lib/mysql #
if I input any command and press enter, the cursor will be at the correct
position.
if I don't set any color prompt, everything is good.
Anyone knows why? Thankssssssss |
|