views:

77

answers:

1

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

just fine, but

compctl -k "(hello world)" yast2

doesn't work at all. Some things for yast2 seem to be already defined, namely the "-" options: --fullscreen, --geometry, --list [submodules], etc.

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.

+2  A: 

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).

The completion function for yast2 is probably in this file (or similar path):

/usr/share/zsh/functions/Completion/Linux/_yast
Dennis Williamson
beautiful, thanks much! I haven't fixed it quite yet (will do so shortly) but your answer seems pretty much spot on (/usr/share/zsh/4.3.6/functions/_yast2 for me).
gatoatigrado