1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-11 13:01:28 +02:00
zsh/Completion/Unix/Command/_pydoc
2014-10-21 20:53:51 +02:00

19 lines
580 B
Text

#compdef pydoc
local context state line ret=1
typeset -A opt_args
_arguments \
'(-)-k[search keyword]:keyword' \
'(- *)-p[start web server on specified port]:port number' \
'(- *)-g[start gui]' \
'(-)-w[write out HTML]:file or dir:_files' \
'(- *)-h[show help information]' \
'*: :->lookup' && ret=0
[[ -n $state ]] && _alternative -C $context \
'keywords:keyword:compadd ${=${${(f)"$(_call_program keywords pydoc keywords)"}[2,-1]}}' \
'topics:topic:compadd ${=${${(f)"$(_call_program topics pydoc topics)"}[2,-1]}}' \
'modules:module:' && ret=0
return ret