I am using zsh. It is a nice shell, especially for the auto completion function. But, when I press tab, it always auto fill with the first completion option. For example, there are two files in my folder.


If I type vim, a blank, then press tab, it will auto fill with Mydata.txt instead of just list them and wait for my input. I do not like to keep on pressing tab to choose the files. It is more easier to press some letters.

I have tried to revise .zshrc and set


But, it doesn't work.

Could anyone give me some hints?


For reference, and as I'm not completely sure, how bash behaves exactly, I quote from the A User's Guide to the Z-Shell by Peter Stephenson, the current maintainer of zsh.

6.2.1 Ambiguous completions

The largest group of options deals with what happens when a completion is ambiguous, in other words there is more than one possible completion. The seven relevant options are as follows, as copied from the FAQ; many different combinations are possible:

  • with NO_BEEP set, that annoying beep goes away,
  • with NO_LIST_BEEP, beeping is only turned off for ambiguous completions,
  • with AUTO_LIST set, when the completion is ambiguous you get a list without having to type CTRL+D,
  • with BASH_AUTO_LIST set, the list only happens the second time you hit tab on an ambiguous completion,
  • with LIST_AMBIGUOUS, this is modified so that nothing is listed if there is an unambiguous prefix or suffix to be inserted -- this can be combined with BASH_AUTO_LIST, so that where both are applicable you need to hit tab three times for a listing,
  • with REC_EXACT, if the string on the command line exactly matches one of the possible completions, it is accepted, even if there is another completion (i.e. that string with something else added) that also matches,
  • with MENU_COMPLETE set, one completion is always inserted completely, then when you hit TAB it changes to the next, and so on until you get back to where you started,
  • with AUTO_MENU, you only get the menu behaviour when you hit TAB again on the ambiguous completion.

You probably want to use (but as I'm said I'm not sure, please feel free to correct me)


where setopt NO_OPTION is equivalent to unset OPTION.

  • Perfect answer - I appreciated the description of the different settings. Stepping through enabling or disabling each one along with the descriptions made it much clearer to me what was needed to be changed and why. Sep 27 '15 at 7:26
  • 1
    1: I think that should say NO_MENU_COMPLETE (note the missing underscore). 2: That option didn't actually help me, I had to set NO_AUTO_MENU instead. Apr 19 at 12:24
  • 1
    @CamJackson: 1. The underscores are irrelevant, MENU_COMPLETE, MENUCOMPLETE as well es MENUCOMP_LETE work exactly the same. 2. Thanks for posting your experience with NO_AUTO_MENU.
    – mpy
    Apr 19 at 16:48

I found a answer by myself. If I set

zstyle ':completion:::*:default' menu no select

Then I can input characters to select the autocomplete options. Though, I can not select by list.


I use

 setopt autolist

Does that do what you want?

  • Thanks, Jens, I used "setopt auto list, unset MENU_CoMPLETE", but, it does not work.
    – HXGuo
    Jun 3 '13 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.