[Bash-completion-devel] [bash-completion-Bugs][312832] perl module completion does not work for 2nd level and beyond package items

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Tue Nov 16 21:16:27 UTC 2010


Bugs item #312832, was opened at 2010-11-16 23:16 by Ville Skyttä 
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312832&group_id=100114

Status: Open
Priority: 3
Submitted By: Ville Skyttä  (scop-guest)
Assigned to: Guillaume Rousse (guillomovitch-guest)
Summary: perl module completion does not work for 2nd level and beyond package items 
Distribution: None
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
perl module completion in current git does not work for 2nd level (and beyond) package items, for example "perl -MFile::Sp<TAB>" returns no completions whereas it should return a bunch of File::Spec* ones.

I don't quite follow the logic there yet, but there's something wrong with the "return immediately if the base doesn't match" logic in helpers/perl - commenting that "return" out seems to fix it (and naturally makes things slower).  Changing the condition to "return if $base && $base !~ /^\Q$word/ && $word !~ /^\Q$base/;" fixes it as well but somehow that feels wrong/ugly to me at the moment and I don't know if it has undesirable side effects.  Could you have a look?

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312832&group_id=100114



More information about the Bash-completion-devel mailing list