Bug 1504523

Summary: Append '/' while tab completing directory names with bash-completion
Product: Red Hat Enterprise Linux 7 Reporter: ddu
Component: bash-completionAssignee: Siteshwar Vashisht <svashisht>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4CC: fkrska, kdudka, kyoneyam, svashisht
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1505938 1722727 (view as bug list) Environment:
Last Closed: 2020-02-05 13:30:08 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: 1505938    
Bug Blocks: 1722727    

Description ddu 2017-10-20 06:06:04 UTC
Description of problem:

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>

In #1495398 a test patch has been created which can achieve this function in bash-4.2

But when bash-completion is installed, it will change the behavior.

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

bash-completion-2.1-6.el7

How reproducible:

everytime

Steps to Reproduce:

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

Actual results:

# ls $HOME<space>

Expected results:

# ls $HOME/

Additional info:

"shopt -u progcomp" will do the job but it will disable auto-completion well.

Comment 2 Siteshwar Vashisht 2017-10-24 14:17:22 UTC
It is still not supported by upstream, so it needs to be implemented in upstream first before it is backported to RHEL.

Comment 3 Siteshwar Vashisht 2018-01-04 10:14:11 UTC
Upstream issue: https://github.com/scop/bash-completion/issues/171

Comment 5 kyoneyama 2019-06-06 07:36:36 UTC
Hello, 

How is the progress on this ?