Bug 177250

Summary: Bash completion mishandles colon characters
Product: [Fedora] Fedora Reporter: JW <ohtmvyyn>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-09 09:10:01 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 JW 2006-01-08 08:15:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217

Description of problem:
For some reason bash treats a colon in a filename in a different way to other charcters, even though it is neither a glob'able, directory separator, or in any other way a special character (except in certain contexts such as variable expansion etc).


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

How reproducible:
Always

Steps to Reproduce:
1. cd /some-directory-containing-many-files
2. touch a:b
3. ls a:<TAB> OR ls a:<CTRL-D>


Actual Results:  Display all 654 possibilities? (y or n)


Expected Results:  Display all 1 possibilities? (y or n)



Additional info:

You must have filename-completion enabled in bash (see your ~/.inputrc or /etc/inputrc).

Comment 1 Tim Waugh 2006-01-08 10:58:15 UTC
This behaviour is intentional, for convenience when setting PATH-like variables.

Comment 2 Tim Waugh 2006-01-08 10:58:48 UTC
(Of course, you can escape it: ls a\:<TAB>)

Comment 3 JW 2006-01-08 13:01:57 UTC
How strange ... "... for convenience when setting PATH-like variables".
Let's think this through carefully.
There you are, at a shell prompt, setting your PATH, using filename-completion.

I wonder how often people do that, compared to the number of times a filename
has a colon in it! LOL!



Comment 4 Tim Waugh 2006-01-09 09:10:01 UTC
This is intentional behaviour.