Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: make zsh completion ergonomics closer to those of bash?



On Wed, 3 Feb 2010, Ian Clarke wrote:

> Thanks Ben, unfortunately no luck :-( -
> 
> On Wed, Feb 3, 2010 at 3:56 PM, Benjamin R. Haskell <zsh@xxxxxxxxxx> wrote:
> > nomenucomplete (synonym for unsetopt menucomplete) is the default.
> >
> > Using zsh-4.3.10, the only completion-related option I have is:
> >
> > $ setopt | grep -E 'comp|menu'
> > noautomenu
> 
> I see the same:
> $ setopt | grep -E 'comp|menu'
> noautomenu
> 
> I've added these lines to the bottom of my .zshrc:
> 
> setopt listambiguous
> setopt noautomenu
> setopt noautolist
> setopt nomenucomplete
> 
> Unfortunately it has had no noticeable effect on the auto-completion 
> behavior :-(
> 
> Incidentally, I'm using the default zsh on OSX 10.6 - zsh 4.3.9 
> (i386-apple-darwin10.0)
> 

Did you try 'setopt bashautolist'?

Otherwise, let's be sure the defaults are the same...

$ set -o | grep -E 'menu|autolist|listam'
noautolist            off
noautomenu            on
bashautolist          off
nolistambiguous       off
menucomplete          off

...and be sure we're talking about the same behavior.

Using zsh, create a test directory:

$ mkdir ~/zshcomptest
$ touch ~/zshcomptest/{afile,bfile,commonprefix{aaa{a,b},ccc}}
$ cd ~/zshcomptest
$ cat <TAB>* (cursor stays in same place)
afile             commonprefixaaaa  commonprefixccc
bfile             commonprefixaaab
$ cat a<TAB> (completes to:)
$ cat afile
$ cat c<TAB>* (completes partial, w/ no list, to:)
$ cat commonprefix
$ cat commonprefix<TAB>* (tab again, gets the list:)
commonprefixaaaa  commonprefixaaab  commonprefixccc

The only difference I see is in how many times I have to hit '<TAB>' 
before getting a list in bash (an extra <TAB> is required at the '*'s).  
With 'setopt bashautolist', I get the same exact behavior.

-- 
Best,
Ben



Messages sorted by: Reverse Date, Date, Thread, Author