Bug 155434

Summary: Incorrect completion in quoted command substitution
Product: [Fedora] Fedora Reporter: Kasper Dupont <bugzilla>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: fedoration
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.1-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-03 09:12:57 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 Kasper Dupont 2005-04-20 10:44:25 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Fedora/1.7.6-1.3.2

Description of problem:
If you attempt to use tab completion in a command substition between quotes, a space is put after directory names instead of the slash.

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

How reproducible:
Always

Steps to Reproduce:
1. type: echo "$(cat /h
2. press tab to complete /home
  

Actual Results:  Shell expands the command to `echo "$(cat /home '

Expected Results:  Shell expands the command to `echo "$(cat /home/'

Additional info:

Expansion works correctly if you use either quotes or command substitiution, it even works if quotes are used inside the command substitution. Command substitution should work the same no matter which context it is used in. It is puzzling me how it is even possible to introduce a bug with exactly these symptoms, it may be a symptom of some more fundamental flaw. I'd like to keep this bug private until we know if it have any security implications.

Comment 1 Tim Waugh 2006-01-03 09:12:57 UTC
Thanks for the report.  This is fixed in bash-3.1.