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

PATCH: improved _perl_modules



Sven Wischnowsky (wischnow@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> 
> Adam Spiers wrote:
> 
> > If Perl isn't found by the `which' below, it might be nice to warn the
> > user, but I don't know how to do that.  I thought of _message but the
> > list of completions gets in the way ...  Maybe it's not worth the
> > effort.
> 
> I haven't tried, but _message should work under every circumstance. And
> from my experience with _arguments, it seems to. Could you give us a
> simple example?

Strange, it seems to work now.

Index: Completion/User/_perl_modules
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_perl_modules,v
retrieving revision 1.2
diff -u -r1.2 _perl_modules
--- Completion/User/_perl_modules	2000/04/26 08:36:44	1.2
+++ Completion/User/_perl_modules	2000/04/26 23:59:13
@@ -31,6 +31,7 @@
     else
       # If perl isn't there, one wonders why the user's trying to
       # complete Perl modules.  Maybe her $path is wrong?
+      _message "Didn't find perl on \$PATH; guessing @INC ..."
 
       setopt localoptions extendedglob
       inc=( /usr/lib/perl5{,/{site_perl/,}<5->.([0-9]##)}(N) 



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