With oh-my-zsh they've extended cd tab completion so that, once the directory selection is active, you can move around all the available directories with the arrow keys, rather than just tabbing through them.

Through searching around I'm unable to figure out how it's done. If it's a plugin that does it then that's fine as I can install oh-my-zsh plugins with zplug.

  • 1
    I'm not 100% sure what you mean exactly, but is it this menu? autoload -Uz compinit, compinit, zstyle ':completion:*' menu select
    – Sparhawk
    Sep 23, 2018 at 0:10
  • Yeah that's exactly what I meant thank you!!
    – bert
    Sep 23, 2018 at 17:21
  • 1
    Great! I've created an answer for you.
    – Sparhawk
    Sep 23, 2018 at 23:22

1 Answer 1


To enable the tab-completion menu in zsh, put the following in ~/.zshrc:

autoload -Uz compinit
zstyle ':completion:*' menu select
  • I got zsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]? what's this?
    – Niing
    Apr 18, 2020 at 3:39
  • @Niing I'm not too sure. I'd recommend opening a new question asking about that.
    – Sparhawk
    Apr 18, 2020 at 6:01
  • I think it needs to be menu-select and not menu select
    – kapad
    Oct 21, 2020 at 11:29
  • To fix the problem that @Niing is having, you should call compinit -C
    – kapad
    Oct 21, 2020 at 11:30
  • @kapad I'm not sure. menu select worked fine for me. There might be multiple ways of doing it.
    – Sparhawk
    Oct 21, 2020 at 11:31

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.