Bug 190350

Summary: vi mode glitch
Product: Red Hat Enterprise Linux 4 Reporter: Tom Sorensen <tsorensen>
Component: bashAssignee: Radek Vokál <rvokal>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: psplicha
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0713 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 575076 (view as bug list) Environment:
Last Closed: 2008-07-24 19:54:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom Sorensen 2006-05-01 15:26:30 UTC
Description of problem:

In Bash 3.x when using vi-mode the repeat function (.) will stop working after a
few lines of editing. Instead of repeating the previous command it will exhibit
various bad behaviors (delete character under cursor or replace character under
cursor with a different character).

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

How reproducible:
Always

Steps to Reproduce:
1. Start a new bash shell
>

2. Type 'ls foo\ (bar)'
>ls foo\ (bar)
bash: syntax error near unexpected token `('

3. Type <ESC>kwwwi\<ESC>ww.<ENTER>
>ls foo\ \(bar\)
ls: foo (bar): No such file or directory

4. Type <ESC>kk<ENTER>
>ls foo\ (bar)
bash: syntax error near unexpected token `('

5. Type <ESC>kwwwi\<ESC>ww.<ENTER>
>ls foo\ \(bar          <--- This is wrong!
ls: foo (bar: No such file or directory
  
Actual results:
Erases or replaces character under cursor.

Expected results:
Repeat last command.

Additional info:
This is confirmed as being fixed in bash 3.1.17. It is known to not be fixed in
3.1.7 (aka 3.1.6-2 in FC5). Unclear exactly which patch fixed the issue; appears
to be a side effect.

Comment 2 RHEL Program Management 2007-05-09 10:29:26 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 Tim Waugh 2007-07-04 16:11:43 UTC
Tom: are you still seeing this problem?  What does 'rpm -q bash' say?

Comment 8 Phil Knirsch 2007-08-02 13:22:44 UTC
As per comment #6 and comment #7 i'm moving this bug to RHEL-4.7.0 as Tim
neither can reproduce the bug and in course find a fix for it, so we need more
time to investigate.

Read ya, Phil

Comment 9 RHEL Program Management 2007-11-29 04:26:00 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 10 Tomas Janousek 2007-12-18 17:39:57 UTC
It would be nice if the reporter verified whether the bug is really reproducible
by the instructions he provided, but I think I found something that may be
causing it. Whenever you do some non-inserting edit command, like 'x' or 'd',
that becomes the command-to-repeat and no further insertions may be repeated.

So, my reproducer for QA and whoever else:
1. Start a new bash shell
2. Type 'kekepop<esc>hxi\<esc>.'
3. You end up with 'kekepo' instead of 'kekep\\o'.

Comment 16 errata-xmlrpc 2008-07-24 19:54:56 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0713.html