Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a recent convert from bash to zsh (which I'm using "oh my zsh" with), but one thing annoys me:

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.

This differs from bash, where you are just shown a list of the completions. If all completions have the same prefix, then this prefix is filled out. You can select the one you want by continuing to type.

I find the latter preferable since it is faster to type, than to select a completion by hitting tab repeatedly.

Is there any way to make zsh completion act more like bash in this regard?

share|improve this question
setopt noautomenu
setopt nomenucomplete

You need both of them. If you hit tab enough times, you'll get the list of completions but it will never add any characters to what you've typed so far.

share|improve this answer

I don't think that's the default behavior, but you can turn it off by using:

setopt +o menucomplete

Other settings that affect this behavior in different ways include: autolist, automenu, bashautolist, listambiguous. See the "Completion" section of man zshoptions for details. You can add this command to your ~/.zshrc file.

You can configure many other things interactively by doing:

autoload -U compinstall

and following the prompts and menus.

In Bash, this behavior is controlled by binding Tab to complete or menu-complete in ~/.inputrc:

"\C-i": complete   # do list completion

or from a shell prompt or in ~/.bashrc:

bind '"\C-i": menu-complete' # do menu completion
share|improve this answer
meta comment: how did you get the "tab" character to look like that? – Good Person May 30 '10 at 17:27
@Good Person: <kbd>Tab</kbd> – Dennis Williamson May 30 '10 at 19:46
thanks – Good Person May 30 '10 at 21:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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