Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 78037

Summary: Executable completion fails if executable is in a subdirectory
Product: [Retired] Red Hat Linux Reporter: William Shubert <wms>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 8.0CC: leonid
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: 2002-11-18 14:05:02 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 William Shubert 2002-11-18 05:45:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
In bash 1, if I have a subdirectory "veryLongDir" containing the executable
"longerExecutable", I can run it by typing "./ver<tab>", at which point
"./veryLongDir/" appears, then I can type "lon<tab>" and the full
"./veryLongDir/veryLongExecutable " appears, ready for me to type arguments. Great!

In Bash 2.05b, it inserts a space instead of the "/" after the "veryLongDir/",
so I type "./ver<tab>", get "./veryLongDir ", and then I must go and manually
backspace, press "/", then type again to get the next level. When I have a
binary several subdirectories deep, this is incredibly annoying. Since having a
directory name as the first part of a shell command is useless, it seems this is
strictly wrong behavior, it should always insert the "/" instead of the space.

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


How reproducible:
Always

Steps to Reproduce:
1. mkdir veryLongDir
2. echo ls >veryLongDir/longerBinary
3. chmod +x veryLongDir/longerExecutable
4. ./ver<tab>


Actual Results:  Command prompt shows useless "./veryLongDir "

Expected Results:  It should show "./veryLongDir/"

Additional info:

Note that if you tab-complete as an argument, it does the right thing; "cat
./ver<tab>" will turn command prompt into "cat ./veryLongDir/". So it is only
wrong when you are typing the executable name.

Comment 1 Tim Waugh 2002-11-19 09:46:29 UTC

*** This bug has been marked as a duplicate of 72512 ***