[Bash-completion-devel] [bash-completion-Bugs][314656] Completion after "perl -l" does not complete filenames.

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Thu Apr 17 12:42:50 UTC 2014


bash-completion-Bugs item #314656 was changed at 2014-04-17 15:42 by Ville Skyttä
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314656&group_id=100114

Status: Open
Priority: 3
Submitted By: Shlomi Fish (shlomif-guest)
Assigned to: Nobody (None)
Summary: Completion after "perl -l" does not complete filenames. 
Distribution: None
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
I'm on Mageia Linux 5 Cauldron using bash-completion-2.1-6.mga5 and after I do this:

shlomif at telaviv1:~$ echo $'#!/usr/bin/perl\nprint "Hello\\n";' > myperl.pl
shlomif at telaviv1:~$ perl -l m[tab]

The [tab] does not complete. perl -l [tab] does not complete either.

OTOH doing:

shlomif at telaviv1:~$ perl -l myperl.pl 
Hello

shlomif at telaviv1:~$ 

Works fine.

Please look into fixing it.

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

>Comment By: Ville Skyttä  (scop-guest)
Date: 2014-04-17 15:42

Message:
One nasty thing with some of perl's option arg completions is the it *is* valid to specify them whitespace separated, such as in "-I foo" and "-Ifoo". This doesn't appear to hold with -l though.

-l shouldn't just be removed from the "case $prev" block, that'll cause issues with for example "perl -l<TAB>". And great care needs to be taken if/when touching the "If option not followed by whitespace" block so that other option completions won't break... so this is not as simple as it seems.

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

Comment By: Pavel Raiskup (praiskup-guest)
Date: 2014-04-16 14:18

Message:
Argh, yes - the argument of '-l' is optional.  Because there is not possible to specify something like '-l OCTAL', it must be '-lOCTAL', we should really complete file-name.  This bugreport is valid then.


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

Comment By: Ville Skyttä  (scop-guest)
Date: 2014-04-16 11:54

Message:
See one reply on list:
http://lists.alioth.debian.org/pipermail/bash-completion-devel/2014-April/005318.html

What Pavel's response doesn't take into account is that the argument to -l is optional. I don't think we can cover this very well -- either we insist that an argument is given (which is what we currently do), or insist that it's not. Both are incorrect, it's a matter of picking the lesser evil.

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

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



More information about the Bash-completion-devel mailing list