zsh-workers
 help / color / mirror / code / Atom feed
* perl -d: completion bug
@ 2008-10-11  5:35 Phil Pennock
  2008-10-11 18:02 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Pennock @ 2008-10-11  5:35 UTC (permalink / raw)
  To: zsh-workers

My zsh completion-fu is weak, still.  Is there a way in which a function
calling another function to do the work can interrupt a  _wanted() to
filter the results, or do I need to re-factor the function currently
calling _wanted() into a helper function which does the work and a
wrapper with the current name which calls _wanted(), then use that new
function?

There's a bug in the Perl completion.  perl -d:<tab> completes all Perl
modules.  What it needs to complete is the sub-string of module names in
the Devel:: namespace, after the Devel::.

The current _perl_modules() uses the caching system to good effect and I
want to keep that, cache all the modules in the same way (might as well,
even for a -d:<tab> completion) and then just filter to a sub-set.

Eg, given the module Devel::Trace installed, you'd invoke Perl thusly:
zsh% perl -d:Trace -e $'print "foo\\n";\nprint "bar\\n";'
>> -e:1: print "foo\n";
foo
>> -e:2: print "bar\n";
bar
zsh%

(And if the answer is trivial, please don't wait on a patch from me!)

Thanks,
-Phil


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-12  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-11  5:35 perl -d: completion bug Phil Pennock
2008-10-11 18:02 ` Bart Schaefer
2008-10-12  8:58   ` PATCH: " Phil Pennock

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).