bug-bash
[Top][All Lists]
Advanced

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

Re: Directory completion problems


From: Chet Ramey
Subject: Re: Directory completion problems
Date: Wed, 25 Apr 2012 13:11:07 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

On 4/23/12 3:57 AM, Artur Rataj wrote:
> To be exact, symlink is in the directory ~/a, and it points to ~/test and
> there is also a directory ~/.java. So, after cd ~/a/symlink, there are two
> ../.java files -- one in the physical parent, and one in the logical
> parent. The former is a directory, the latter is a plain file.
> 
> ~/a/symlink$ cd ../
> 
> produces one alternative: .java, but only if the plain file .java exists.

OK, we're back to completion again.  My previous post was intended to
illustrate the effect of a logical view of the file system.

I can't reproduce very much of what you're seeing.  I can only conclude
that there is a completion specification for `cd' that is getting in the
way and complicating things.  For instance, after a `cd symlink', hitting
TAB after "cd ../" gives me the alternatives `i' and `symlink'.  Hitting
TAB after "cd symlink/../" in `a' gives me the same two alternatives.
You're not seeing that, so I have to think you're using some other function
to generate the completions.

One thing, however, could make a difference.  If, for some reason, you
get .java as a completion and there is a file named .java in the logical
parent and a directory named .java in the physical parent, cd will work.
This is a case of cd trying to be helpful: directory canonicalization
fails, so the shell tries to use the argument as supplied as a last resort.
In this case, that succeeds.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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