Bug 1495398 - Append '/' while tab completing directory names
Summary: Append '/' while tab completing directory names
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: bash
Version: 7.4
Hardware: Unspecified
OS: Linux
Target Milestone: rc
: ---
Assignee: Siteshwar Vashisht
QA Contact: Jakub Heger
Depends On:
Blocks: 1549617 1549689 1551061
TreeView+ depends on / blocked
Reported: 2017-09-26 01:33 UTC by ddu
Modified: 2020-02-28 09:52 UTC (History)
5 users (show)

Fixed In Version: bash-4.2.46-31.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-10-30 10:11:24 UTC
Target Upstream Version:

Attachments (Terms of Use)
bash-4.3-dircomp-append-slash.patch (3.15 KB, patch)
2017-10-16 18:03 UTC, Siteshwar Vashisht
kdudka: review+
Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3117 0 None None None 2018-10-30 10:11:32 UTC

Internal Links: 1504523 1505938

Description ddu 2017-09-26 01:33:23 UTC
Description of problem:

1. add support for directory environment variable of bash

2. Account info

Account:  AKTIOHOLDHINGS Corporation.	
TAM customer: no
SRM customer: no
Strategic: no

3. What is the nature and description of the request?

In bash-4.3, when use tab to auto complete the variable, if the variable is
a directory, it will attend a "/" after the variable.

# ls $HOM    -> click TAB
# ls $HOME/

RHEL provides bash-4.2 in RHEL7, it will attend a space after the variable.

# ls $HOM    -> click TAB
# ls $HOME<space>

4. Why does the customer need this? (List the business requirements here)

Cu need bash-4.2 provides the same function of bash-4.3.

5. How would the customer like to achieve this? (List the functional requirements here)

backport the same function from bash-4.3

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

test by above command.

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

not found.

8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

Cu is using RHEL7.3 now.

9. Is the sales team involved in this request and do they have any additional input?


10. List any affected packages or components.


11. Would the customer be able to assist in testing this functionality if implemented?


12. Does the functionality already exist?  If so, help explain to the customer and junior associate how to implement this.

13. Is the idea a bad idea?  Please explain why so that the case owner can clearly articulate this back to the customer

Yes and No. The proposed feature itself is a good idea and is current behaviour upstream since bash-4.3. However, in order to maintain stability
we don't change default behaviour in minor RHEL versions unless there is a business case behind overweighting the risks.

14. Is there already a duplicate request for this?  Some basic Bugzilla/jira searching or prior knowledge of similar requests is required here.
15. Are there any other concerns the senior member has?  i.e. maybe the functional requirements aren't explained well and need more detail.

Yes. It's a default behaviour change proposal. It changes behaviour in interactive shell only, so there's low risk of breaking existing scripts.
The behaviour change in interactive shell increases usability so will probably be perceived well by vast majority of customers. There's slight risk some
customer will get confused or will question our stability promise. In case accepted needs Release Note.

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


How reproducible:

$ ls $HOM  -> click TAB

Additional info:

As bash-completion has changed the behavior of bash, you need to disable bash-completion or remove it.

Comment 3 Siteshwar Vashisht 2017-10-16 18:03:33 UTC
Created attachment 1339396 [details]

Comment 5 Kamil Dudka 2017-10-17 08:16:34 UTC
Comment on attachment 1339396 [details]

The backport looks good.  I had some difficulties to test it, needed to enter
'shopt -u progcomp' first to get the expected behavior on my el7 VM but it can
be a local configuration issue.

Comment 15 errata-xmlrpc 2018-10-30 10:11:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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