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

Re: perl -d: completion bug



On Oct 10, 10:35pm, Phil Pennock wrote:
}
} 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::.

If it were just a matter of restricting to the "Devel::" namespace,
you could change _perl to replace

    '-d\:-[run under control of a debugging/tracing module]:debugging/tracing module:_perl_modules' \

with

    '-d\:-[run under control of a debugging/tracing module]:debugging/tracing module:_perl_modules -F "( *~Devel\:\: )"' \

However, also stripping off the "Devel::" from the front of the matches
is a bit trickier.  What you want is something like "compadd -W" except
that works for things other than filename prefixes.

My best suggestion is to update _perl_modules to take an additional flag
that identifies the module namespace, and use that to change the name of
the caching policy, etc.  Unfortunately I don't have free time right now
to attempt to code it up.



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