Bug 1495398

Summary: Append '/' while tab completing directory names
Product: Red Hat Enterprise Linux 7 Reporter: ddu
Component: bashAssignee: Siteshwar Vashisht <svashisht>
Status: CLOSED ERRATA QA Contact: Jakub Heger <jheger>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: fkrska, jheger, kdudka, mkyral, ovasik
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: bash-4.2.46-31.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:11:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1549617, 1549689, 1551061    
Attachments:
Description Flags
bash-4.3-dircomp-append-slash.patch kdudka: review+

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.	
          #1507132
    
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?

No

10. List any affected packages or components.

bash/bash-completion

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

Yes.

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

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.
No
   
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):

bash-4.2.46-29.el7_4

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]
bash-4.3-dircomp-append-slash.patch

Comment 5 Kamil Dudka 2017-10-17 08:16:34 UTC
Comment on attachment 1339396 [details]
bash-4.3-dircomp-append-slash.patch

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.

https://access.redhat.com/errata/RHBA-2018:3117