8

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.

2
  • 2
    I'm not 100% sure what you mean exactly, but is it this menu? autoload -Uz compinit, compinit, zstyle ':completion:*' menu select Commented Sep 23, 2018 at 0:10
  • 1
    Great! I've created an answer for you. Commented Sep 23, 2018 at 23:22

1 Answer 1

19

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

autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
6
  • I got zsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]? what's this? Commented Apr 18, 2020 at 3:39
  • @Niing I'm not too sure. I'd recommend opening a new question asking about that. Commented Apr 18, 2020 at 6:01
  • I think it needs to be menu-select and not menu select Commented Oct 21, 2020 at 11:29
  • To fix the problem that @Niing is having, you should call compinit -C Commented 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. Commented Oct 21, 2020 at 11:31

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.