I'm using Ubuntu (10.04) with bash, and am running into an odd issue. After I use the up arrow to scroll back through my history of commands, and get back to one of the longer commands (i.e., one with enough characters to wrap on the screen), but then continue to scroll either forward or backward, the first 8 or 9 characters of that long command show up on my entry line.
These characters don't have any impact on whatever command I eventually enter, but it's occasionally hard to figure out what I'm trying to type.
It looks something like this first:
name@machine:~$
Then becomes this:
name@machine:~$ scp -i /h
after scrolling back to one of my long scp commands. If I then enter a command, like so:
name@machine:~$ scp -i /hls -l
it executes the command: ls -l
Edited to add the value of PS1 in my ~/.bashrc
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\033[31;40m\]$(__git_ps1 "[%s]")\[\033[00m\]\$ '
Edited again to add the value of echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\033[31;40m\]$(__git_ps1 "[%s]")\[\033[00m\]\$
echo $PS1prints. – cYrus Sep 8 '10 at 13:43