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:

> On Wed, Feb 3, 2010 at 3:27 PM, Matias GraÃa <matias.alejo@xxxxxxxxx> wrote:
> > On Wed, Feb 3, 2010 at 6:03 PM, Ian Clarke <ian@xxxxxxxxxxxxxx> wrote:
> > > When I hit the tab key, the first autocompletion is filled out 
> > > automatically, and you need to cycle through the completions by 
> > > hitting tab repeatedly (or using the arrow keys).
> > >
> > > Is there any way to make zsh completion act more like bash in this 
> > > regard?
> >
> > After a long try/error session, I've found a few days ago that the 
> > variable MENUCOMPLETE had a lot to do with this.  See if you have 
> > "setopt MENUCOMPLETE" somewhere in your rc's and try to comment it 
> > out.
> >
> Thanks MatÃas, unfortunately I couldn't find MENUCOMPLETE anywhere in 
> my .zshrc or any file sourced from it.   I tried typing "unsetopt 
> MENUCOMPLETE" but it didn't help :-(

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'

(i.e. 'setopt noautomenu' or 'unsetopt automenu')

Firing up bash-4.something it appears to work the same.

If that doesn't work for you, your distribution might set something up 
in /etc{,/zsh}/{,z{,sh}}{profile,env,rc}
(i.e. a bunch of places w/ or w/o a preceding zsh in the name of the 
file or directory.)

I always look in 'man zshall', since I never know what submanual things 
are in.  For more information on this in zshall, you can find options 
relevant to completion by searching 2-3 times for 'Completion' or once 

In this particular instance, you should also take a look at 'man 
zshoptions', which starts off with a description of the ways to specify 
options (i.e. the facts that 'AUTO_MENU' is equivalent to 'automenu' and 
that 'noautomenu' is equivalent to 'unsetopt automenu'.)

I also see BASH_AUTO_LIST (i.e. 'setopt bashautolist'), which might have 
relevance here.


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