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.
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\ ]\$ ' path/long- path/long- path/long- path/long- path/long- path/long- path/long- path
ln -s . /tmp/long-path
cd /tmp/long-
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-_command long-command long-command long-command l
-path/long-
ong-command
Reproduced on both Hardy’s bash 3.2-0ubuntu18 and Intrepid’s bash 3.2-4ubuntu1.