ZSH highlight on tab

断了今生、忘了曾经 提交于 2019-12-03 16:20:39

问题


One of the features that I kept hearing about zsh was that it will highlight your selection as you tab through a list of possible choices. Such as choosing a directory to cd into.

I thought this feature would be enabled automatically, but it doesn't appear to be. At the moment I have this in my .zshrc for git auto completion

  zstyle ':completion:*:*:git:*' script /usr/local/etc/bash_completion.d/git-completion.bash
  fpath=(/usr/local/share/zsh-completions $fpath)
  autoload -U compinit && compinit
  zmodload -i zsh/complist

What else do I have to add to get this effect?


回答1:


You also need menu and select:

zstyle ':completion:*' menu select


来源:https://stackoverflow.com/questions/29196718/zsh-highlight-on-tab

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!