bash completion doesn't work for 'perl -c'
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:/
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:/
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.