Bug 1036694 - path completion does not handle symlinks well
Summary: path completion does not handle symlinks well
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Oprala
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-02 13:41 UTC by Michal Hlavinka
Modified: 2016-02-01 02:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-10 09:20:47 UTC
Type: Bug


Attachments (Terms of Use)

Description Michal Hlavinka 2013-12-02 13:41:02 UTC
Description of problem:
file path completion gives incorrect results when path contains symlink

Version-Release number of selected component (if applicable):
bash-4.2.45-1.fc19.x86_64

How reproducible:
always

Steps to Reproduce:
1.prepare environment

$ mkdir foo bar
$ ln -s ../foo bar/foo
$ touch abcd foo/abfoo bar/abbar

2.try it
$ cd bar/foo 

I) $ file ../ab<TAB> 
-> $ file ../abbar 
-> ../abbar: ERROR: cannot open `../abbar' (No such file or directory)
Error is correct, such file does not exist

II) $ file ../abc<TAB>
-> $ file ../abc - no completion, but ../abcd exists
$ file ../abcd
../abcd: empty

Actual results:
tab completion does not see some files and completes name to nonexistent files

Expected results:
tab completion working with symlinks

Additional info:
It works in both ksh and mksh

Comment 1 Ondrej Oprala 2014-01-10 09:20:47 UTC
Thanks for the report. This is an expected behaviour of bash. The behaviour you specified can be achieved by using 'set -o physical'.


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