Bug 583919 - tab-completion appends slash to non-directories
tab-completion appends slash to non-directories
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: bash (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Roman Rakus
BaseOS QE - Apps
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-20 04:44 EDT by Tomas Smetana
Modified: 2014-01-12 19:11 EST (History)
7 users (show)

See Also:
Fixed In Version: bash-3.2-28.el5
Doc Type: Bug Fix
Doc Text:
In some situations, bash incorrectly appended "/" to files instead of just directories during tab-completion, causing incorrect auto-completions. This is fixed and auto-complete appends "/" only to directories.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-21 06:37:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The patch posted by Loren Merritt to the upstream mailing list (404 bytes, patch)
2010-04-20 04:45 EDT, Tomas Smetana
no flags Details | Diff

  None (edit)
Description Tomas Smetana 2010-04-20 04:44:28 EDT
Description of problem:
This bug is just a copy of a message in the upstream mailing list: see http://lists.gnu.org/archive/html/bug-bash/2008-07/msg00008.html

After triggering directory tab-completion as part of the command in
a command-substitution ( `` or "$()" but not $() ), bash enters a state
where tab-completion appends a / to all matched filenames, not just
directories.

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

How reproducible:
always

Steps to Reproduce:
1. complete -r
2. cd /tmp; touch example
3. ls examp<TAB>
4. `/tm<TAB>
5. ls examp<TAB>

Actual results:
example/

Expected results:
example

Additional info:
The referenced message contains a simple patch which fixes the problem.
Comment 1 Tomas Smetana 2010-04-20 04:45:42 EDT
Created attachment 407765 [details]
The patch posted by Loren Merritt to the upstream mailing list
Comment 2 David Tonhofer 2010-04-25 10:17:42 EDT
Yup, yup.

This auto-completion problem does not occur on RH4 (bash-3.0-21.el4_8.2) only in latest RH5 bash (bash-3.2-24.el5)
Comment 4 drewskiwooskie 2010-06-01 07:29:48 EDT
We are seeing the same thing here with RHEL 5.4 (bash-3.2-24.el5)
Is there any chance this will be put into an update for 5.4?
Comment 6 RHEL Product and Program Management 2010-08-09 15:25:39 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 10 Roman Rakus 2011-03-03 12:08:47 EST
Fixed in bash-3.2-28.el5
Comment 14 Branislav Náter 2011-04-14 03:28:14 EDT
Fix verified on bash-3.2-29.el5 on all architectures.
Comment 15 Misha H. Ali 2011-04-20 05:24:37 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In certain circumstances bash incorrectly appended "/" to files that are  not directories when attempting tab-completion. This is fixed to remove the automatic appending of "/" after files that are not directories to allow the auto complete function to function as expected.
Comment 16 Misha H. Ali 2011-04-20 05:40:56 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-In certain circumstances bash incorrectly appended "/" to files that are  not directories when attempting tab-completion. This is fixed to remove the automatic appending of "/" after files that are not directories to allow the auto complete function to function as expected.+In certain circumstances bash incorrectly appended "/" to files that are not directories when attempting tab-completion, resulting in incorrect auto-completion options. This is fixed to remove the automatic appending of "/" after files that are not directories to allow the auto complete function to function as expected.
Comment 17 Misha H. Ali 2011-05-03 21:37:52 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-In certain circumstances bash incorrectly appended "/" to files that are not directories when attempting tab-completion, resulting in incorrect auto-completion options. This is fixed to remove the automatic appending of "/" after files that are not directories to allow the auto complete function to function as expected.+In some situations, bash incorrectly appended "/" to files instead of just directories during tab-completion, causing incorrect auto-completions. This is fixed and auto-complete appends "/" only to directories.
Comment 18 errata-xmlrpc 2011-07-21 06:37:56 EDT
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/RHSA-2011-1073.html

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