zsh: Autocomplete ambigously only on second tab press

2

Currently, when I hit TAB, and there's more than one option to autocomplete, zsh will show all of them. If I hit TAB a second time, it will pick the first.

I'd like to change this to:

  1. First TAB: Do nothing if there are more than one option
  2. Second TAB: Show the list
  3. Third TAB: pick the first

Is that possible?

(Why? When I hit tab, it's usually because I think what I typed was unambiguous. If it's not, I want to stop for a second and look back before getting the list.)

In addition, how do I turn on menu-based completion (where I can choose the choices from a menu)?

S. Robert James

Posted 2011-11-21T16:02:26.997

Reputation: 21

Answers

0

in ~/.zshrc

unsetopt BASH_AUTO_LIST

With BASH_AUTO_LIST set, the list only appears the second time you hit tab on an ambiguous completion.

Take a look at Ambiguous completions section for more options

tolitius

Posted 2011-11-21T16:02:26.997

Reputation: 189

Will this work for zsh? The question was about zsh autocomplete – Michael Dorst – 2019-04-16T16:55:42.250

Tested. This does not work for me. – Michael Dorst – 2019-04-16T16:57:28.483