Comment 9 for bug 119938

Revision history for this message
Anders Kaseorg (andersk) wrote :

Ah, I do have an example. Use the default colorized prompt from /etc/skel/.bashrc, and cd into a directory with a very long pathname that causes the prompt to linewrap:

PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
ln -s . /tmp/long-path
cd /tmp/long-path/long-path/long-path/long-path/long-path/long-path/long-path/long-path

Then, if you type a very long command that results another linewrap, and hit Ctrl+A, the cursor will be moved to the sixth character of the command instead of the first, and future editing operations will affect the wrong characters.

anders@balanced-tree:/tmp/long-path/long-path/long-path/long-path/long-path/long
-path/long-path/long-path$ long-_command long-command long-command long-command l
ong-command

Reproduced on both Hardy’s bash 3.2-0ubuntu18 and Intrepid’s bash 3.2-4ubuntu1.