about summary refs log tree commit diff
path: root/Completion/Unix/Command/_pydoc
blob: 92a01a76fcc0d25af8eb7ebdc23f485ee8149942 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#compdef pydoc

local context state line
typeset -A opt_args

_arguments \
  '-k[keyword]:keyword:' \
  '-p[port]:port:_ports' \
  '-g[gui]' \
  '-w[write out HTML]:file or dir:_files' \
  ':keyword, topic, module, package, or dotted reference:->lookup' && return 0

_alternative \
  'keywords:keyword:compadd ${=${${(f)"$(pydoc keywords)"}[2,-1]}}' \
  'topics:topic:compadd ${=${${(f)"$(pydoc topics)"}[2,-1]}}' \
  'modules:module:'