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

Re: vim like completion in bash?



On Mon, Mar 05, 2007 at 03:36:35PM EST, Franck Joncourt wrote:
> On Mon, Mar 05, 2007 at 02:04:05AM -0500, cga2000 wrote:
> > On Sun, Mar 04, 2007 at 06:54:45PM EST, Steve Lamb wrote:
> > > Wayne Topa wrote:
> > > > zhengquan zhang(zhang.zhengquan.mailinglist@gmail.com) is reported to have said:
> > > >> Hello:
> > > >> I can :e *doc* in vim, pressing tab and it can help me find the document I
> > > >> need,
> > > >> but in bash if I use vi *doc* and press tab, nothing would happen, it can
> > > >> not find the file I want to edit
> > > >> Is there any switches to make it possible?
> > > >> Thank you.
> > > 
> > $ mkdir ss
> > $ touch ss/tt ss/uu
> > $ vim ss/*t* + <TAB>       /* results in  */
> > $ vim ss/tt
> > 
> > $ rm -rf ss                
> 
> I may have missed something ; I am running Sid.
> Enabling bash completion, it does not work. However, without bash
> completion it does work ! Where is the trick ?

"completion" means _smart_ completion:

if you cd (eg.) it should only accept directories.  If you "cd abc +
<TAB>" and there are only regular files beginning with "abc" it will
yell at you.  If  you telnet it will only accept (and do completion for)
hosts and ignore everything else. 

etc. 

So either your bash completion stuff is broken (see
/etc/bash_completion) or you are trying to vim to something that your
bash_completion script thinks you shouldn't be vimming to.

HTH

Thanks,
cga



Reply to: