Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _pydoc



I didn't include modules because "pydoc modules" spouts a lot of garbage on
my system and I didn't care enough to find out why.

Index: Completion/Unix/Command/_pydoc
===================================================================
RCS file: Completion/Unix/Command/_pydoc
diff -N Completion/Unix/Command/_pydoc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_pydoc	30 Jan 2009 16:24:16 -0000
@@ -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:'



Messages sorted by: Reverse Date, Date, Thread, Author