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

PATCH: cleanup for _perldoc

I've forgotten to look at this again several times now...

Just a better tagification for _perldoc.

Btw, the pods tag is one of those I'd like to get rid off. Or maybe we 
want to keep all of them? Then we probably should think about using
more descriptive tag-names in other places, too (actually increasing
the number of tags). If not, we should probably try to reduce the
number of tags drastically.

And while I'm talking about administrative stuff anyway... did anyone
have the time to think about the suggested online-help thing? I think
_complete_help (or at least the mechanism it uses) may be a good
starting point. Probably that together with an utility function _help
which can be used by completion functions to `register' help texts.
These texts would be collected and functions like _complete_help could 
access them. We could also improve _complete_help by making functions
like _tags collect information about the function call stack (i.e.
just store ${(j.:.)funcstack[2,-1]} somewhere). I haven't done that
yet because I have no idea how interested users woould in informations 
like this. Will they ever have a look at the functions? Or will they
only `use' it, probably adding simple completion functions for their


diff -u oldcompletion/User/_perldoc Completion/User/_perldoc
--- oldcompletion/User/_perldoc	Tue Nov 23 15:14:03 1999
+++ Completion/User/_perldoc	Tue Nov 23 15:24:43 1999
@@ -14,16 +14,10 @@
 _perl_pods () {
-  local nm="$compstate[nmatches]"
-  local expl
-  _perl_modules
-  _perl_basepods
-  _description expl 'Perl modules and .pods'
-  _files "$expl[@]"  -g '*.(pod|pm)'
-  [[ nm -ne "$compstate[nmatches]" ]]
+  _alternative \
+    'modules:: _perl_modules' \
+    'pods:: _perl_basepods' \
+    'files:Perl modules and .pods:_files -g \*.\(pod\|pm\)'
 _perldoc "$@"

Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

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