Bug 249987 - Bash completion misbehavior
Summary: Bash completion misbehavior
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tomas Janousek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F8Target
TreeView+ depends on / blocked
 
Reported: 2007-07-29 01:29 UTC by Ronald Wahl
Modified: 2008-01-29 05:16 UTC (History)
3 users (show)

Fixed In Version: 3.2-20.fc7
Clone Of:
Environment:
Last Closed: 2008-01-29 05:16:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ronald Wahl 2007-07-29 01:29:59 UTC
Description of problem:

Bash completion misbehaves when editing command lines from history and PS1
contains non-printable characters (even in \[ \]). Even printable characters
between \[ \] trigger it.

Version-Release number of selected component (if applicable):

bash-3.2-9.fc7

How reproducible:

Always

Steps to Reproduce:
1. start a bash
2. set the prompt: PS1='\[\033[1m\]\u@\h:\w\$\[\033[m\] '
3. execute ls -d /usr/bin
4. press UP to recall the just executed command from history
5. position the cursor over the first slash
6. enter /bi and press TAB three times
  
Actual results:

Cursor is positioned far ahead and editing the line is messed up somehow, e.g.
backspace behaves wrong.

Expected results:

Cursor should be behind the expanded word (e.g. /bin/ in this example).

Additional info:

Comment 1 Ignacio Vazquez-Abrams 2007-07-29 01:49:44 UTC
This bug is rare but I have seen it on my system. It seems as though it's not
counting the chars between \[ and \] correctly under certain circumstances.

Comment 2 Pete Graner 2007-08-29 13:57:48 UTC
This looks to be fixed by ftp://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-024

Will build and test this week.

Comment 3 Pete Graner 2007-09-17 19:59:13 UTC
Fixed in bash-3.2-18.fc8



Comment 4 Ignacio Vazquez-Abrams 2007-09-17 20:26:28 UTC
Fixing the resolution since the fix isn't available in the version given in this
bug.

Comment 5 Ronald Wahl 2007-11-18 20:59:33 UTC
I cannot verify that this bug is fixed in bash-3.2-18.fc8. I still see the bug on
an updated (F7->F8) and a freshly installed F8 system.

Comment 6 Ronald Wahl 2008-01-13 01:43:11 UTC
It seems this bug is fixed in the official patch 27 for bash. Unfortunately Fedora
is stuck at patch level 25. Because this bug is really annoying I would greatly
appreciate it if this can be fixed in Fedora 8.

Thanks!

Comment 7 Tomas Janousek 2008-01-14 10:01:17 UTC
Yeah, sorry for the delay, I'll push it soon.

Comment 8 Fedora Update System 2008-01-18 23:56:57 UTC
bash-3.2-20.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bash'

Comment 9 Fedora Update System 2008-01-19 00:00:00 UTC
bash-3.2-20.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bash'

Comment 10 Ronald Wahl 2008-01-19 21:52:48 UTC
Great - it works! Many thanks! So this bug can be closed when the package is
pushed to the official repos.

Comment 11 Fedora Update System 2008-01-29 05:16:05 UTC
bash-3.2-20.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2008-01-29 05:16:27 UTC
bash-3.2-20.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.