I'm using the last stable bash-3.2_p17-r1. The wrong behavior depends on the length of the command line. I used normal ASCII characters. Reproducible: Always Steps to Reproduce: 1.write a dummy string with a certain length (23 'k' in my case is enough) 2.position the cursor on the second character kkkkkkkkkkkkkkkkkkkkkk ^-- here 3. press TAB for the completion action Display all 281 possibilities? (y or n) << Press n >> Actual Results: The cursor position is totally wrong. Expected Results: The cursor should be at the initial position. If the prompt is not colored (PS1='\u@\h \w \$ ') the problem disappear. The colored prompt is PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \$\[\033[00m\] '
The problem is resolved by bash patch 27 described here: http://lists.gnu.org/archive/html/bug-bash/2008-01/msg00005.html I tried installing the patch against the current stable version of bash with a custom ebuild. This bug should depend on an app-shells/bash-3.2_p33 stabilization bug which doesn't exist yet
bash-3.2_p33 is in the tree already