是否可以禁用 zsh 'select' 样式需要点击 return 才能 select 一个选项?

Is it possible to disable zsh 'select' style's need to hit return in order to select an option?

视觉上,我喜欢补全样式提供的选择菜单:

zstyle ':completion:*' menu select;

但是,必须按 return 才能离开选择菜单,这让我抓狂。我宁愿按 return 会立即 运行 激活提示。

由于 zsh 会立即将选择填充到活动提示中,我希望找到一种方法来禁用这个额外的 return 按键,但我一直无法在网上或手册页中找到任何相关内容. 如果不像"I just missed the page and I'm an idiot,"那么简单,我可以去哪里学习如何自定义 zsh 的这方面?

zshmodules(1)'s "The zsh/complist module" could help. It is pointed in the zshcompsys(1)'s "Standard styles" 'menu' entry.

zmodload zsh/complist
# Below overrides default '^M' keybind.
bindkey -M complist '^M' .accpet-line

这里是 zsh/complist 模块条目末尾的 zsh 手册说明:

All movement functions wrap around at the edges; any other zle function not listed leaves menu selection and executes that function. It is possible to make widgets in the above list do the same by using the form of the widget with a . in front. For example, the widget .accept-line has the effect of leaving menu selection and accepting the entire command line.

--- zshmodules(1), menu selection, the zsh/complist module