* Re: PATCH: improved _perl_modules
@ 2000-04-25 8:09 Sven Wischnowsky
2000-04-26 23:59 ` Adam Spiers
0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 2000-04-25 8:09 UTC (permalink / raw)
To: zsh-workers
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?
> I haven't committed this to CVS yet, because I lost track of what was
> decided about references to sequence numbers and ChangeLogs etc. Can
> some kind soul please summarise the procedure?
Just put the sequence number of the mail with the diff (10892) in the
ChangeLog and the commit message. Seems to be what everybody does now.
> (and confirm that I'm
> trusted enough to make small changes like this without cocking up
> badly ;-) Thanks.
Why not?
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* PATCH: improved _perl_modules
2000-04-25 8:09 PATCH: improved _perl_modules Sven Wischnowsky
@ 2000-04-26 23:59 ` Adam Spiers
0 siblings, 0 replies; 3+ messages in thread
From: Adam Spiers @ 2000-04-26 23:59 UTC (permalink / raw)
To: zsh-workers
Sven Wischnowsky (wischnow@informatik.hu-berlin.de) 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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* PATCH: improved _perl_modules
@ 2000-04-22 16:11 Adam Spiers
0 siblings, 0 replies; 3+ messages in thread
From: Adam Spiers @ 2000-04-22 16:11 UTC (permalink / raw)
To: zsh workers mailing list
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 committed this to CVS yet, because I lost track of what was
decided about references to sequence numbers and ChangeLogs etc. Can
some kind soul please summarise the procedure? (and confirm that I'm
trusted enough to make small changes like this without cocking up
badly ;-) Thanks.
Index: Completion/User/_perl_modules
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_perl_modules,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 _perl_modules
--- Completion/User/_perl_modules 2000/03/23 04:19:30 1.1.1.6
+++ Completion/User/_perl_modules 2000/04/22 16:05:40
@@ -26,7 +26,17 @@
_perl_modules=( $(pminst) )
else
local inc libdir new_pms
- inc=( $( perl -e 'print "@INC"' ) )
+ if which perl >/dev/null; then
+ inc=( $( perl -e 'print "@INC"' ) )
+ else
+ # If perl isn't there, one wonders why the user's trying to
+ # complete Perl modules. Maybe her $path is wrong?
+
+ setopt localoptions extendedglob
+ inc=( /usr/lib/perl5{,/{site_perl/,}<5->.([0-9]##)}(N)
+ ${(s.:.)PERL5LIB} )
+ fi
+
typeset -agU _perl_modules # _perl_modules is global, no duplicates
_perl_modules=( )
@@ -36,7 +46,7 @@
# Find all modules
cd $libdir
- new_pms=( {[A-Z]*/**/,}*.pm(N) )
+ new_pms=( {[A-Z]*/***/,}*.pm~*blib*(N) )
cd $OLDPWD
# Convert to Perl nomenclature
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-04-26 23:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-25 8:09 PATCH: improved _perl_modules Sven Wischnowsky
2000-04-26 23:59 ` Adam Spiers
-- strict thread matches above, loose matches on Subject: below --
2000-04-22 16:11 Adam Spiers
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).