怎样才能覆盖现有的zsh键盘完成? [英] How does one override an existing zsh keyboard completion?
问题描述
我想使zsh来为自动完成的YaST2(在OpenSuse控制面板)模块,但它似乎已经定义了一些东西。我可以运行
I would like to enable zsh to autocomplete modules for yast2 (an OpenSuSE control panel), but it seems to already have some things defined. I can run
compctl -k "(hello world)" nonexistantprogram
不错,但
compctl -k "(hello world)" yast2
行不通的。有些事情的yast2似乎已经定义,即 - 选项:--fullscreen,--geometry,--list [子模块],等等
doesn't work at all. Some things for yast2 seem to be already defined, namely the "-" options: --fullscreen, --geometry, --list [submodules], etc.
即使对于那些谁不使用OpenSuSE的:是否有任何标志compctl,使其覆盖previous设置?非常感谢在前进。
Even if for those who don't use OpenSuSE: Are there any flags to compctl to make it override previous settings? Thanks very much in advance.
推荐答案
最有可能的,你的系统使用的是较新的 compsys
系统,而不是旧的 compctl
系统。参见男人zshcompsys
和男人zshcompwid
(和男人zshcompctl
)
Most likely, your system is using the newer compsys
system rather than the older compctl
system. See man zshcompsys
and man zshcompwid
(and man zshcompctl
).
为的yast2
完成功能可能是在这个文件(或类似的路径):
The completion function for yast2
is probably in this file (or similar path):
/usr/share/zsh/functions/Completion/Linux/_yast
这篇关于怎样才能覆盖现有的zsh键盘完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!