Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 155434 - Incorrect completion in quoted command substitution
Summary: Incorrect completion in quoted command substitution
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2005-04-20 10:44 UTC by Kasper Dupont
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 3.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-01-03 09:12:57 UTC

Attachments (Terms of Use)

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

How reproducible:

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.

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