3

How do I prevent ZSH cycling through matching completions but instead just presenting a list of remaining possibilities in a list?

On my more recent OS installations I've started getting ZSH cycling behavior when pressing tab. I do not like it and prefer it just show me a list of matches. My older OS installations have this, so I'm guessing some default setting in a newer version of Zsh is the cause. I've tried searching on Google, and diffing my environment variables (env output - I can include this them if it helps but it will be very long) but I just can't figure out the right setting(s).

Here is my environment information:

Works as desired on the following systems (lists matches each time I press tab)

  • zsh 4.3.12 (i386-apple-darwin11.2.0),Darwin macbookair 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 i386 MacBookAir4,2 Darwin
  • zsh 5.1.1 (i686-ubuntu-linux-gnu), Linux nuc2017 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:58:51 UTC 2017 i686 i686 i686 GNU/Linux
    • fresh Ubuntu install
  • zsh 5.0.8 (x86_64-apple-darwin15.0), Darwin Sridhars-Mac-mini.local 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64 i386 Macmini6,1 Darwin

Does not work as desired (cycles through matches each time I press tab)

  • zsh 5.1.1 (x86_64-ubuntu-linux-gnu), Linux nuc 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    • dist-upgraded my Ubuntu from a previous version
  • OS X Sierra (version info not available - it's on my work computer)

Things I've tried that don't work:

unsetopt menu_complete
1
  • 1
    Have you tried unsetopt auto_menu?
    – ZeroKnight
    Commented Apr 2, 2018 at 1:07

2 Answers 2

3

What you're looking for is setopt noautomenu

See https://serverfault.com/questions/109207/how-do-i-make-zsh-completion-act-more-like-bash-completion for a full list of options

1

If you have a clean Zsh installation with only this in your ~/.zshrc file

autoload -Uz compinit && compinit -C

then it shows a list of completions the first time you press tab.

However, if you add

unsetopt AUTO_LIST

then this no longer happens and completion starts cycling immediately.

To see if this option has been unset, do

setopt

which shows all options that are different from the default. If the output includes noautolist, then AUTO_LIST has been unset.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .