summaryrefslogtreecommitdiff
path: root/Completion/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_pydoc16
1 files changed, 16 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_pydoc b/Completion/Unix/Command/_pydoc
new file mode 100644
index 000000000..92a01a76f
--- /dev/null
+++ b/Completion/Unix/Command/_pydoc
@@ -0,0 +1,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:'