bash completion doesn't work for 'perl -c'

Bug #128290 reported by FernanAguero
18
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
Fix Released
Undecided
Mika Fischer

Bug Description

Binary package hint: bash

Steps to reproduce the problem:
touch file.pm && touch file.pl

Filename completion works in this case:
perl fi<TAB>

(correctly completes filename up to 'file.p')

Filename completion doesn't work in this case:
perl -c fi<TAB>

No completion happens at all!

In case you don't know 'perl -c file.pl' or 'perl -c file.pm' is what you
do to check the syntax of a perl program or module. It's annoying
to have to type the complete PATH to your perl code when you want
to check its syntax!

Although this particular bug has not been reported before, I think it's related
to other reported bugs:

Completion doesn't work after 'tar rf'
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/94407

And generally related to how annoying this completion cleverness is when it
fails (which is quite often, given that it completely depends on someone writing
the completion for each and every possible way in which a command can be written)

Completion cleverness is fragile and hence stupid
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/94408

Revision history for this message
niknah (hankin0) wrote :

It doesn't handle input/output either...
perl myprogram.pl <./<tab>

The only autocompletion I use is for filenames, different autocompletion setups per app can lead to maintenance problems. Imagine whenever someone adds/removes/changes the way an option works for an app, the autocompletion will have to be updated again. Is someone going to sit there and read the changes for every release for every app the autocompletion is supporting? Not even sure if anyone has read this bug report.

Revision history for this message
Mika Fischer (zoop) wrote :

I cannot reproduce this on a current hardy install. Could you please check if you still experience this bug?

Changed in bash-completion:
status: New → Incomplete
Revision history for this message
niknah (hankin0) wrote :

Yes this is no longer a problem for me, bash completion is disabled in /etc/bash.bashrc in hardy, and it may have been disabled in 7.10 too.

Revision history for this message
Mika Fischer (zoop) wrote :

Ok, thanks. Please note that it should even work with bash_completion enabled now :)

Changed in bash-completion:
assignee: nobody → zoop
status: Incomplete → Fix Released
Revision history for this message
niknah (hankin0) wrote :

Yes, it works fine. :)

Revision history for this message
fernanAguero (fernan-iib) wrote :

Still not working for me.

This is on Ubuntu 7.10, perl 5.8.8 (This is perl, v5.8.8 built for i486-linux-gnu-thread-multi)

Bash completion is commented out in /etc/bash.bashrc but not in my own ~/.bashrc

Revision history for this message
Mika Fischer (zoop) wrote :

It is fixed in hardy (8.04, to be released this month). Small bugs like this usually don't get fixed in older releases, sorry.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.