[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] readline fails completion when a softlink to a direct

From: Chet Ramey
Subject: Re: [Bug-readline] readline fails completion when a softlink to a directory is involved
Date: Wed, 09 Apr 2008 17:32:54 -0400
User-agent: Thunderbird (Macintosh/20080213)

Eduardo Sanz-Garcia wrote:

Machine Type: i686-redhat-linux-gnu

Bash Version: 3.0
Patch Level: 15
Release Status: release

    readline completion problem when using symbolic links

Create the following directory tree:
   |-area ....
   |         :
   |         :
   |         :
   |-level1  :
      |      V
      |-level2a: 1,2,3
      |-level2b: a,b,c

 ... represent symbolic link

mkdir level1

mkdir level1/level2a
mkdir level1/level2b

touch level1/level2a/1
touch level1/level2a/2
touch level1/level2a/3

touch level1/level2b/a
touch level1/level2b/b
touch level1/level2b/c

ln -s level1/level2a area

Type: "ls area/../l"  and press tab.
If level1 is the autocompletion choice it is wrong.
The correct choices are level2a and level2b.

Thank you very much. And sorry in advance if this is not a real problem.

This isn't really a readline problem, since bash controls this aspect
of filename completion.

Bash maintains a logical view of the file system.  This means that `..'
moves one directory back in a pathname, regardless of the physical
hierarchy.  In this case, that means that `area/..' disappears.  This
logical view of the file system is the default, as specified by Posix,
and is maintained through cd and pwd/$PWD and honored by other parts
of the shell that resolve directory pathnames.

If you're uncomfortable with the logical view of the file system and the
default treatment of `..', you can use `set -o physical' to force the
shell to always use physical pathnames.

``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]