Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17758 - bash autocompletion directory listing gives wrong results
Summary: bash autocompletion directory listing gives wrong results
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-18 11:37 UTC by Arun Bhanu (RETIRED)
Modified: 2003-03-18 17:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arun Bhanu (RETIRED) gentoo-dev 2003-03-18 11:37:08 UTC
What is special about /mnt/floppy and /mnt/cdrom directories? This behaviour
(see below) only occurs in these two directories.

Reproducible: Always
Steps to Reproduce:
1.cd /etc
2.Don't mount the floppy to /mnt/floppy
3.do a cd /mnt/floppy/<TAB><TAB> hit tab twice to see the contents of the 
directory.

Actual Results:  
It should not list any files as /mnt/floppy does not contain any files. But it 
lists all the files in the current directory. In this case, /etc. In step 1 you 
can cd to anywhere you like.

I can reproduce this error in two boxes. I tried the same with a redhat 
installation bash version 2.05a. It behaves normally. ie. it does not list any 
files when the directory does not contain any file.

This error can be reproduced with /mnt/cdrom. But I can't get this error with 
other empty folders. I don't know why it behaves like that.

Can anyone else reproduce this?


Expected Results:  
should not see any files listing because there are no files inside the 
directory.
Comment 1 Seth Chandler 2003-03-18 11:43:13 UTC
the first tab completes the .keep inside the /mnt/floppy or /mnt/cdrom, and since there 
is a space after the .keep on the bash command line, it then looks in the current 
directory.... 
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-03-18 17:18:44 UTC
as in comment #1 written, the .keep file in both (special) dirs does this