Bug 249987 - Bash completion misbehavior
Bash completion misbehavior
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Tomas Janousek
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: F8Target
  Show dependency treegraph
 
Reported: 2007-07-28 21:29 EDT by Ronald Wahl
Modified: 2008-01-29 00:16 EST (History)
3 users (show)

See Also:
Fixed In Version: 3.2-20.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-29 00:16:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ronald Wahl 2007-07-28 21:29:59 EDT
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-28 21:49:44 EDT
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 09:57:48 EDT
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 15:59:13 EDT
Fixed in bash-3.2-18.fc8

Comment 4 Ignacio Vazquez-Abrams 2007-09-17 16:26:28 EDT
Fixing the resolution since the fix isn't available in the version given in this
bug.
Comment 5 Ronald Wahl 2007-11-18 15:59:33 EST
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-12 20:43:11 EST
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 05:01:17 EST
Yeah, sorry for the delay, I'll push it soon.
Comment 8 Fedora Update System 2008-01-18 18:56:57 EST
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-18 19:00:00 EST
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 16:52:48 EST
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 00:16:05 EST
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 00:16:27 EST
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.