Subject: Re: Tab completion in /bin/sh
To: James Chacon <jmc@NetBSD.org>
From: Soren Jacobsen <snj@NetBSD.org>
List: current-users
Date: 05/13/2005 23:12:17
On May 13, 2005, at 4:30 PM, James Chacon wrote:

> On Fri, May 13, 2005 at 11:57:10AM +0200, Tim Jakobsen wrote:
>
>> On Fri, May 13, 2005 at 11:32:08AM +0200, Alan Barrett wrote:
>>
>>> There's no way for the shell to know whether you want to expand "/ 
>>> lib"
>>> to "/lib/" or to "/libexec/".  The best it can do is to show you  
>>> a list
>>> of possible completions and let you choose.  And it does do  
>>> that.  So I
>>> don't understand what you want to be different.
>>>
>>
>> That is why I want it to expand it to /lib/ if I eg. continue  
>> pretting tab a few times.
>>
>>
>
> Which other shell have you used that has this behavior? All I've  
> ever used
> either present the choices on another tab (bash) or control-D (tcsh).

zsh.

"cd /lib" followed by one tab:
procrustes:~$ cd /lib
lib/      libexec/

"cd /lib" followed by two tabs:
procrustes:~$ cd /lib/
lib/      libexec/

"cd /lib" followed by three tabs:
procrustes:~$ cd /libexec/
lib/      libexec/

and it cycles between them if you keep going.