11

I currently configure my zsh tab completion with:

 autoload -U compinit && compinit
 zstyle ':completion:*:default' menu select=0
 zstyle ':completion:*:default' select-scroll 0

What I like about this is:

  1. unambiguous completions get completed immediately
  2. ambiguous completions get expanded as far as possible (first strike of tab) and ambiguities get listed to me (second strike)
  3. hitting tab further (one more tab stroke after the list appeared) I go through the menu-select'ions, i.e. the prompt stays above the list of ambiguities, one of them gets highlighted and it is inserted in the prompt, and hitting tab further, I go to the next item. Even in case the list of ambiguities cannot be displayed, then the list below the prompt scrolls.

What I don't like:

  • if the list is too long to be displayed, it gets first printed completely and the prompt ends up below the list, and only with the next stroke, I end up at the top of the terminal again for the menu-select mode.

So I'd like to change the behaviour to:

  1. unambiguous completions get completed immediately
  2. ambiguous completions get expanded as far as possible (first strike of tab) and ambiguities get listed to me, ALWAYS below the prompt, even if the list is too long to be shown completely (doesn't matter if first or second stroke)
  3. hitting tab further (one more tab stroke after the list appeared) I go through the menu-select'ions, i.e. the prompt stays above the list of ambiguities, one of them gets highlighted and it is inserted in the prompt, and hitting tab further, I go to the next item. Even in case the list of ambiguities cannot be displayed, then the list below the prompt scrolls.

A crucial aspect is that the list of ambiguities gets shown before the first one is inserted into the prompt. Otherwise I could already use

zstyle ':completion:*:default' menu select=0 yes=0
pseyfert
  • 3,263
  • 3
  • 21
  • 47

0 Answers0