Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _pydoc
- X-seq: zsh-workers 26494
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: _pydoc
- Date: Fri, 30 Jan 2009 16:25:22 +0000
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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