[Bash-completion-devel] bash: File completion bug with executables inside a control structure

David Paleino d.paleino at gmail.com
Fri May 16 22:10:34 UTC 2008


fixed 131101 20060301-4
thanks

Hi Ajay, hi Peter,

On Sun, 27 Jan 2002 13:12:54 +0530, Ajay Shah wrote:

> The . directory is not on my PATH.
> I happened to have an executable named 'pauseplay' in the . directory.
> 
> In bash, if I say
> 
>   $ pause[TAB]
> 
> bash behaves correctly -- there is no executable starting with 'pause'
> on my $PATH.
> 
> But if I say
> 
>   $ while [ 1 ] ; do pause[TAB]
> 
> bash wrongly completes this! :) He should force me to say
> 
>   $ while [ 1 ] ; do ./pau[TAB]
> 
> which is consistent with $PATH.

On 16 Jul 2002 19:57:41 +1000, Peter Moulder wrote:

> A hacky fix is to define a custom completion for "do" and "then"
> (and perhaps xargs, env, su etc. at the same time).
> [..]


This has been fixed in newer versions of bash (and bash-completion, which has
been split from bash in February 2008). In particular, you won't find it in
20060301-4 (the current testing/unstable version), but I can't really say which
was the first version fixing this.


Thanks for your report,
David

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20080517/c597ddd4/attachment.pgp 


More information about the Bash-completion-devel mailing list